Fix empty search index error on Linux

This commit is contained in:
NGPixel 2016-09-06 21:14:29 -04:00
parent 48e2afa5c0
commit a0c0486dab

View File

@ -86,6 +86,17 @@ module.exports = {
};
}
}).catch((err) => {
if(err.type === 'NotFoundError') {
return {
match: [],
suggest: []
};
} else {
winston.error(err);
}
});
},
@ -113,6 +124,14 @@ module.exports = {
return true;
}
}).catch((err) => {
if(err.type === 'NotFoundError') {
return true;
} else {
winston.error(err);
}
}).then(() => {
return self._si.addAsync({