@rpcbase/server 0.329.0 → 0.330.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* @flow */
|
|
2
|
-
const assert = require("assert")
|
|
3
2
|
const debug = require("debug")
|
|
4
3
|
const _get = require("lodash/get")
|
|
5
4
|
const _set = require("lodash/set")
|
|
@@ -42,7 +41,11 @@ const mongoose_delete_plugin = (schema) => {
|
|
|
42
41
|
return mongoose.models[k].collection.collectionName === coll_name
|
|
43
42
|
})
|
|
44
43
|
|
|
45
|
-
assert(model_name, `unable to resolve model name for coll_name:${coll_name}`)
|
|
44
|
+
// assert(model_name, `unable to resolve model name for coll_name:${coll_name}`)
|
|
45
|
+
// there are dynamic models so we can't assert model_name is there
|
|
46
|
+
if (!model_name) {
|
|
47
|
+
return
|
|
48
|
+
}
|
|
46
49
|
|
|
47
50
|
dispatch_queue(queue, model_name, "delete", doc)
|
|
48
51
|
})
|
|
@@ -63,7 +66,9 @@ const dispatch_change_handler = (change) => {
|
|
|
63
66
|
return mongoose.models[k].collection.collectionName === coll_name
|
|
64
67
|
})
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
if (!model_name) {
|
|
70
|
+
return
|
|
71
|
+
}
|
|
67
72
|
|
|
68
73
|
dispatch_queue(queue, model_name, op, change.fullDocument, change.updateDescription)
|
|
69
74
|
}
|