fng-ui-select 0.12.0-beta.194 → 0.12.0-beta.196

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.194",
4
+ "version": "0.12.0-beta.196",
5
5
  "description": "angular-ui-select plugin for forms-angular",
6
6
  "repository": {
7
7
  "type": "git",
@@ -59,7 +59,7 @@
59
59
  lookupFunc: function (value, formSchema, cb) {
60
60
  if (formSchema.array) {
61
61
  const promises = value.map((value) => {
62
- const id = value.x?.id || value.x; // if it's already been converted, throw away the result of the previous conversion
62
+ const id = value.x ? (value.x.id || value.x) : undefined; // if it's already been converted, throw away the result of the previous conversion
63
63
  if (!id) {
64
64
  return $q.resolve({ data: { list: ""} }); // nothing to convert
65
65
  } else if (valueCache[id]) {
@@ -87,7 +87,7 @@
87
87
  cb(formSchema, value); // already converted
88
88
  } else if (formSchema.fngUiSelect.deriveOptions) {
89
89
  const obj = localLookups[formSchema.fngUiSelect.deriveOptions].find((test) => test.id === value);
90
- cb(formSchema, { id: value, text: obj?.text || "" });
90
+ cb(formSchema, { id: value, text: obj ? obj.text : "" });
91
91
  } else {
92
92
  useCacheOrLookItUp(formSchema.ref, value, (text) => { cb(formSchema, { id: value, text }) });
93
93
  }