drapcode-utility 1.2.5 → 1.2.6

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.
@@ -499,7 +499,7 @@ var replaceExternalParams = function (query, requiredExternal, externalParams, c
499
499
  if (value === drapcode_constant_1.CURRENT_USER) {
500
500
  finalValue = currentUser["uuid"];
501
501
  }
502
- else
502
+ if (!finalValue)
503
503
  finalValue = value;
504
504
  return finalValue;
505
505
  }
@@ -550,7 +550,17 @@ var replaceExternalParams = function (query, requiredExternal, externalParams, c
550
550
  if (fieldType &&
551
551
  !requiredExternal &&
552
552
  ["dynamic_option", "static_option", "reference"].includes(fieldType)) {
553
- return value;
553
+ var refCollection = query.refCollection, refField = query.refField;
554
+ var finalValue = "";
555
+ if (refCollection === drapcode_constant_1.CURRENT_USER) {
556
+ finalValue = currentUser[refField];
557
+ }
558
+ if (value === drapcode_constant_1.CURRENT_USER) {
559
+ finalValue = currentUser["uuid"];
560
+ }
561
+ if (!finalValue)
562
+ finalValue = value;
563
+ return finalValue;
554
564
  }
555
565
  if (fieldType &&
556
566
  fieldType === "boolean" &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drapcode-utility",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",