forms-angular 0.12.0-beta.253 → 0.12.0-beta.255
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/dist/server/data_form.js +12 -9
- package/package.json +1 -1
package/dist/server/data_form.js
CHANGED
|
@@ -943,6 +943,7 @@ class FormsAngular {
|
|
|
943
943
|
case "$group":
|
|
944
944
|
case "$limit":
|
|
945
945
|
case "$replaceRoot":
|
|
946
|
+
case "$replaceWith":
|
|
946
947
|
case "$sort":
|
|
947
948
|
case "$unwind":
|
|
948
949
|
// We don't care about these - they are all (as far as we know) safe
|
|
@@ -1031,17 +1032,19 @@ class FormsAngular {
|
|
|
1031
1032
|
// Push the $unwind, add our own findFunc, and increment the pipelineStage counter
|
|
1032
1033
|
retVal.push(array[pipelineSection + 1]);
|
|
1033
1034
|
let lookedUpFindQry = await this.doFindFuncPromise(req, resource);
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
lookedUpFindQry
|
|
1038
|
-
|
|
1035
|
+
if (lookedUpFindQry) {
|
|
1036
|
+
// Now we need to put the lookup base into the criteria
|
|
1037
|
+
for (const prop in lookedUpFindQry) {
|
|
1038
|
+
if (lookedUpFindQry.hasOwnProperty(prop)) {
|
|
1039
|
+
lookedUpFindQry[`${lookupField}.${prop}`] = lookedUpFindQry[prop];
|
|
1040
|
+
delete lookedUpFindQry[prop];
|
|
1041
|
+
}
|
|
1039
1042
|
}
|
|
1043
|
+
if (allowNulls) {
|
|
1044
|
+
lookedUpFindQry = { $or: [lookedUpFindQry, { [lookupField]: { $exists: false } }] };
|
|
1045
|
+
}
|
|
1046
|
+
retVal.push({ $match: lookedUpFindQry });
|
|
1040
1047
|
}
|
|
1041
|
-
if (allowNulls) {
|
|
1042
|
-
lookedUpFindQry = { $or: [lookedUpFindQry, { [lookupField]: { $exists: false } }] };
|
|
1043
|
-
}
|
|
1044
|
-
retVal.push({ $match: lookedUpFindQry });
|
|
1045
1048
|
pipelineSection++;
|
|
1046
1049
|
}
|
|
1047
1050
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"author": "Mark Chapman <support@forms-angular.org>",
|
|
4
4
|
"description": "A form builder that sits on top of Angular.js, Twitter Bootstrap, jQuery UI, Angular-UI, Express and Mongoose. Opinionated or what?",
|
|
5
5
|
"homepage": "http://forms-angular.org",
|
|
6
|
-
"version": "0.12.0-beta.
|
|
6
|
+
"version": "0.12.0-beta.255",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=8.x",
|
|
9
9
|
"npm": ">=5.x"
|