From 93ced8023defd1d400e24e3e3cd2aee9904bc977 Mon Sep 17 00:00:00 2001 From: edencoder Date: Fri, 23 Oct 2020 16:10:49 +1000 Subject: [PATCH] amend issues, push for live --- bundles/asset/models/file.js | 2 +- bundles/asset/models/image.js | 2 +- bundles/asset/tasks/assets.ts | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bundles/asset/models/file.js b/bundles/asset/models/file.js index c0fd4de..5da42cb 100755 --- a/bundles/asset/models/file.js +++ b/bundles/asset/models/file.js @@ -175,7 +175,7 @@ class File extends Model { */ url() { // Return asset transport url - return this.transport().url(this); + return this.transport() ? this.transport().url(this) : null; } /** diff --git a/bundles/asset/models/image.js b/bundles/asset/models/image.js index 2ba990b..aa07121 100755 --- a/bundles/asset/models/image.js +++ b/bundles/asset/models/image.js @@ -225,7 +225,7 @@ class Image extends File { // Get url for thumbs for (const thumb of Object.values(sanitised.thumbs)) { // Set thumb url - thumb.url = await this.transport().url(this, (thumb.name || thumb.label)); + thumb.url = this.transport() ? await this.transport().url(this, (thumb.name || thumb.label)) : null; // delete meta delete thumb.meta; diff --git a/bundles/asset/tasks/assets.ts b/bundles/asset/tasks/assets.ts index 5078f63..3bd73e8 100644 --- a/bundles/asset/tasks/assets.ts +++ b/bundles/asset/tasks/assets.ts @@ -33,6 +33,9 @@ class AssetsTask { // reload js this.cli.emit('scss', 'reload'); + + // return success + return `assets linked!`; } /**