From d2318f49942958c9666cab7514a3844e05a9b9ae Mon Sep 17 00:00:00 2001 From: Sonny Lloyd Date: Wed, 4 Oct 2017 14:24:32 +0100 Subject: [PATCH] Update FileUploader.js fixes asset manager to auto add images to assets --- src/asset_manager/view/FileUploader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asset_manager/view/FileUploader.js b/src/asset_manager/view/FileUploader.js index 4324984d4..c3c02feab 100644 --- a/src/asset_manager/view/FileUploader.js +++ b/src/asset_manager/view/FileUploader.js @@ -73,7 +73,7 @@ module.exports = Backbone.View.extend({ const em = this.config.em; const config = this.config; const target = this.target; - const json = typeof text === 'text' ? JSON.parse(text) : text; + const json = typeof text === 'string' ? JSON.parse(text) : text; em && em.trigger('asset:upload:response', json); if (config.autoAdd && target) {