maxpool 1.6.0 → 1.6.1
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 +1 -1
- package/src/account-manager.js +5 -3
package/package.json
CHANGED
package/src/account-manager.js
CHANGED
|
@@ -2053,9 +2053,11 @@ export class AccountManager {
|
|
|
2053
2053
|
next.peakWindows = peakWindows;
|
|
2054
2054
|
}
|
|
2055
2055
|
if (peakCap !== undefined) {
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2056
|
+
// The SAME coercion trap the read path documents: Number(null)/Number('')/
|
|
2057
|
+
// Number(false) are all 0 = the HARD BAR. A persisted 0 is then unreachable
|
|
2058
|
+
// by the read-path guard (typeof 0 === 'number'). Reject non-numbers here.
|
|
2059
|
+
if (typeof peakCap !== 'number' || !Number.isFinite(peakCap) || peakCap < 0 || peakCap > 1) return false;
|
|
2060
|
+
next.peakCap = peakCap;
|
|
2059
2061
|
}
|
|
2060
2062
|
if (peakDepreference !== undefined) next.peakDepreference = Boolean(peakDepreference);
|
|
2061
2063
|
if (peakTimezone !== undefined) {
|