@porscheinformatik/clr-addons 15.8.3 → 15.8.4
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/fesm2020/clr-addons.mjs
CHANGED
|
@@ -4235,7 +4235,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
4235
4235
|
*/
|
|
4236
4236
|
|
|
4237
4237
|
/*
|
|
4238
|
-
* Copyright (c) 2018-
|
|
4238
|
+
* Copyright (c) 2018-2024 Porsche Informatik. All Rights Reserved.
|
|
4239
4239
|
* This software is released under MIT license.
|
|
4240
4240
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
4241
4241
|
*/
|
|
@@ -4320,12 +4320,10 @@ class ClrHistoryService {
|
|
|
4320
4320
|
}
|
|
4321
4321
|
reduceSize(entries) {
|
|
4322
4322
|
if (JSON.stringify(entries).length > this.maxSize) {
|
|
4323
|
-
const reduced = [];
|
|
4323
|
+
const reduced = [...entries];
|
|
4324
4324
|
do {
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
}
|
|
4328
|
-
} while (JSON.stringify(reduced).length < this.maxSize);
|
|
4325
|
+
reduced.shift();
|
|
4326
|
+
} while (JSON.stringify(reduced).length > this.maxSize);
|
|
4329
4327
|
return reduced;
|
|
4330
4328
|
}
|
|
4331
4329
|
else {
|