spice-js 2.7.12 → 2.7.13

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.
@@ -791,7 +791,7 @@ class SpiceModel {
791
791
  if ((cached_results == null ? void 0 : cached_results.value) === undefined || (yield _this6.shouldForceRefresh(cached_results))) {
792
792
  results = yield _this6.database.multi_get(args.ids, {
793
793
  keep_type: true,
794
- columns: args.columns.length > 0 && args.columns != "" ? [...args.columns, 'type'] : []
794
+ columns: args.columns && args.columns.length > 0 && args.columns != "" ? [...args.columns, 'type'] : []
795
795
  });
796
796
 
797
797
  _this6.getCacheProviderObject(_this6.type).set(key, {
@@ -802,7 +802,7 @@ class SpiceModel {
802
802
  } else {
803
803
  results = yield _this6.database.multi_get(args.ids, {
804
804
  keep_type: true,
805
- columns: args.columns.length > 0 && args.columns != "" ? [...args.columns, 'type'] : []
805
+ columns: args.columns && args.columns.length > 0 && args.columns != "" ? [...args.columns, 'type'] : []
806
806
  });
807
807
  }
808
808
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spice-js",
3
- "version": "2.7.12",
3
+ "version": "2.7.13",
4
4
  "description": "spice",
5
5
  "main": "build/index.js",
6
6
  "repository": {
@@ -684,7 +684,7 @@ export default class SpiceModel {
684
684
  cached_results?.value === undefined ||
685
685
  (await this.shouldForceRefresh(cached_results))
686
686
  ) {
687
- results = await this.database.multi_get(args.ids, {keep_type:true, columns:args.columns.length > 0 && args.columns != ""?[...args.columns, 'type']:[]});
687
+ results = await this.database.multi_get(args.ids, {keep_type:true, columns:args.columns && args.columns.length > 0 && args.columns != ""?[...args.columns, 'type']:[]});
688
688
  this.getCacheProviderObject(this.type).set(
689
689
  key,
690
690
  { value: results, time: new Date().getTime() },
@@ -692,7 +692,7 @@ export default class SpiceModel {
692
692
  );
693
693
  }
694
694
  } else {
695
- results = await this.database.multi_get(args.ids, {keep_type:true, columns:args.columns.length> 0 && args.columns != ""?[...args.columns, 'type']:[]});
695
+ results = await this.database.multi_get(args.ids, {keep_type:true, columns:args.columns && args.columns.length > 0 && args.columns != ""?[...args.columns, 'type']:[]});
696
696
  }
697
697
  }
698
698
  _.remove(results, (o) => o.type != this.type);