Fix for Search index not updated during create

This commit is contained in:
NGPixel
2017-02-24 17:02:54 -05:00
parent 9976842e45
commit 3300d42866
2 changed files with 5 additions and 3 deletions

View File

@@ -321,7 +321,9 @@ module.exports = {
return self.exists(entryPath).then((docExists) => {
if (!docExists) {
return self.makePersistent(entryPath, contents).then(() => {
return self.updateCache(entryPath)
return self.updateCache(entryPath).then(entry => {
return search.add(entry)
})
})
} else {
return Promise.reject(new Error('Entry already exists!'))