From 5a29a21c810a0963b1fd9ebced47bcdd63e4ec3c Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 23 May 2019 09:55:54 -0400 Subject: [PATCH] Fix error when loading a non-cached non-local asset The error condition was triggered when the following conditions were met: - Load a non-local asset, i.e. selecting a filter list which is not part of the package - The non-local asset is not in the local cache --- dist/version | 2 +- src/js/assets.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/version b/dist/version index 836ae4eda..843f86353 100644 --- a/dist/version +++ b/dist/version @@ -1 +1 @@ -1.19.2 +1.19.4 diff --git a/src/js/assets.js b/src/js/assets.js index 286a43200..90ce0aa75 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -693,6 +693,10 @@ api.get = function(assetKey, options, callback) { } else if ( typeof callback !== 'function' ) { callback = noopfunc; } + // This can happen if the method was called as a thenable. + if ( options instanceof Object === false ) { + options = {}; + } return new Promise(resolve => { // start of executor