Skip to content

Commit 886466d

Browse files
authored
COMPASS-849: Backport COMPASS 832 - Return to avoid running the success case on error of insert document (#821) (#826)
#retry "Compass Functional Tests for QueryBar #spectron" https://travis-ci.com/10gen/compass/jobs/67359963 "renders the home screen" https://travis-ci.com/10gen/compass/jobs/67360320 "renders the home screen" https://travis-ci.com/10gen/compass/jobs/67361030 "hangs running renderer tests" https://travis-ci.com/10gen/compass/jobs/67360781 "Error: ENOENT: no such file or directory, open '/home/travis/build/10gen/compass/node_modules/electron-prebuilt/path.txt'" https://travis-ci.com/10gen/compass/jobs/67361031 "Schema - renders field types" https://travis-ci.com/10gen/compass/jobs/67361464
1 parent dc0ed4b commit 886466d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/internal-packages/crud/lib/store/insert-document-store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const InsertDocumentStore = Reflux.createStore({
2727
insertDocument: function(doc) {
2828
app.dataService.insertOne(NamespaceStore.ns, doc, {}, (error) => {
2929
if (error) {
30-
this.trigger(false, error);
30+
return this.trigger(false, error);
3131
}
3232
// check if the newly inserted document matches the current filter, by
3333
// running the same filter but targeted only to the doc's _id.

0 commit comments

Comments
 (0)