diff --git a/assets/js/media_library.widget.js b/assets/js/media_library.widget.js index a50d7ce..73b080a 100644 --- a/assets/js/media_library.widget.js +++ b/assets/js/media_library.widget.js @@ -161,7 +161,7 @@ window.$(function ($) { _normalizeFileData: function (payload) { var data = { title: payload.title || payload.clientname, - imageUrl: new URL(XE._.get(payload, 'file.url', payload.url)).pathname, + imageUrl: payload.url ? new URL(XE._.get(payload, 'file.url', payload.url)).pathname : undefined, mediaId: (payload.file_id) ? XE._.get(payload, 'id', '') : '', fileId: XE._.get(payload, 'file_id', payload.id || ''), size: payload.size,