zet-lib 1.0.42 → 1.0.43
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/lib/connection.js +0 -1
- package/lib/zRoute.js +6 -4
- package/package.json +1 -1
package/lib/connection.js
CHANGED
package/lib/zRoute.js
CHANGED
|
@@ -3288,11 +3288,13 @@ zRoute.modelsCache = async() => {
|
|
|
3288
3288
|
const splits = key.split("___") || [];
|
|
3289
3289
|
let item = splits.length > 1 ? splits[1] : key;
|
|
3290
3290
|
let arr = [];
|
|
3291
|
-
|
|
3292
|
-
|
|
3291
|
+
if(results.length) {
|
|
3292
|
+
for (const result of results) {
|
|
3293
|
+
arr.push({id: result.id, zname: result[item]});
|
|
3294
|
+
}
|
|
3295
|
+
const myarray = Util.sortArray(arr, 'zname');
|
|
3296
|
+
myCache.set(`${keys}_${key}_${company.id}`, myarray);
|
|
3293
3297
|
}
|
|
3294
|
-
const myarray = Util.sortArray(arr, 'zname');
|
|
3295
|
-
myCache.set(`${keys}_${key}_${company.id}`, myarray);
|
|
3296
3298
|
}
|
|
3297
3299
|
}
|
|
3298
3300
|
}
|