diff --git a/lib/sandbox.js b/lib/sandbox.js index 7b30f42..e0c52a4 100644 --- a/lib/sandbox.js +++ b/lib/sandbox.js @@ -935,6 +935,11 @@ module.exports.cli = { return; } + // set as empty array, in case the original list came undefined + if ( typeof list !== 'object' ) { + list = []; + } + if (sortBy) { list = require('./json').sort(list, sortBy); }