wacom 20.2.6 → 20.2.7

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.
@@ -2804,12 +2804,12 @@ class CrudService extends BaseService {
2804
2804
  filteredDocuments(storeObjectOrArray, config = {}) {
2805
2805
  const callback = () => {
2806
2806
  if (Array.isArray(storeObjectOrArray)) {
2807
- const result = this._docs.filter(config.valid ?? (() => true));
2807
+ let result = this._docs.filter(config.valid ?? (() => true));
2808
2808
  storeObjectOrArray.length = 0;
2809
- storeObjectOrArray.push(...result);
2810
2809
  if (typeof config.sort === 'function') {
2811
- storeObjectOrArray.sort(config.sort);
2810
+ result = result.sort(config.sort);
2812
2811
  }
2812
+ storeObjectOrArray.push(...result);
2813
2813
  }
2814
2814
  else {
2815
2815
  const storeObject = storeObjectOrArray;