Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 527356 - Trying to load a Tern definition that does not exist wri…
…tes exception to the console
  • Loading branch information
mrennie committed Nov 16, 2017
1 parent fb91fa7 commit 91bd400
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -168,7 +168,17 @@ require([
return Deferred.all(loadDefs(defNames, projectLoc));
})
.then(function (json) {
options.defs = json;
var arr = json;
if(!Array.isArray(arr)) {
arr = [arr];
}
options.defs = [];
arr.forEach(function(def) {
if(Object.keys(def).length < 1) {
return;
}
options.defs.push(def);
});
startAndMessage(options);
}, fallback)
.then(undefined, fallback);
Expand Down

0 comments on commit 91bd400

Please sign in to comment.