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
This commit is contained in:
Raymond Hill 2019-05-23 09:55:54 -04:00
parent 07cbae66a4
commit 5a29a21c81
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 5 additions and 1 deletions

2
dist/version vendored
View File

@ -1 +1 @@
1.19.2 1.19.4

View File

@ -693,6 +693,10 @@ api.get = function(assetKey, options, callback) {
} else if ( typeof callback !== 'function' ) { } else if ( typeof callback !== 'function' ) {
callback = noopfunc; callback = noopfunc;
} }
// This can happen if the method was called as a thenable.
if ( options instanceof Object === false ) {
options = {};
}
return new Promise(resolve => { return new Promise(resolve => {
// start of executor // start of executor