added error checking to install.js for categories

This commit is contained in:
barisusakli
2014-07-02 21:55:05 -04:00
parent 5ea74ae9e9
commit 586aeaf53f
2 changed files with 19 additions and 20 deletions

View File

@@ -275,7 +275,7 @@ var db = require('./database'),
return callback(err);
}
if (!Array.isArray(categories)) {
if (!Array.isArray(categories) || !categories.length) {
return callback(null, []);
}