fng-ui-select 0.12.0-beta.192a → 0.12.0-beta.192b

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,7 +1,7 @@
1
1
  {
2
2
  "name": "fng-ui-select",
3
3
  "author": "Mark Chapman <support@forms-angular.org>",
4
- "version": "0.12.0-beta.192a",
4
+ "version": "0.12.0-beta.192b",
5
5
  "description": "angular-ui-select plugin for forms-angular",
6
6
  "repository": {
7
7
  "type": "git",
@@ -57,7 +57,11 @@
57
57
  lookupFunc: function (value, formSchema, cb) {
58
58
  if (formSchema.array) {
59
59
  const promises = value.map((value) => {
60
- const id = value.x?.id || value.x; // if it's already been converted, throw away the result of the previous conversion
60
+ let id = value.x;
61
+ // if it's already been converted, throw away the result of the previous conversion
62
+ if (id && id.id) {
63
+ id = id.id;
64
+ }
61
65
  if (!id) {
62
66
  return $q.resolve({ data: { list: ""} }); // nothing to convert
63
67
  } else if (valueCache[id]) {
@@ -85,7 +89,7 @@
85
89
  cb(formSchema, value); // already converted
86
90
  } else if (formSchema.fngUiSelect.deriveOptions) {
87
91
  const obj = localLookups[formSchema.fngUiSelect.deriveOptions].find((test) => test.id === value);
88
- cb(formSchema, { id: value, text: obj?.text || "" });
92
+ cb(formSchema, { id: value, text: obj ? obj.text : "" });
89
93
  } else {
90
94
  useCacheOrLookItUp(formSchema.ref, value, (text) => { cb(formSchema, { id: value, text }) });
91
95
  }