Remove "Infinity" usage

This commit is contained in:
schroda
2025-04-14 23:35:53 +02:00
parent 76167ebb67
commit 898cc200f0
2 changed files with 2 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ export class Queue {
fn: () => PromiseLike<T> | T,
priority: QueuePriority = Priority.NORMAL,
): { key: string; promise: Promise<T> } {
this.counter = (this.counter + 1) % Infinity;
this.counter = (this.counter + 1) % Number.MAX_SAFE_INTEGER;
const actualKey = `${key}_${this.counter}`;
this.pendingKeyToPriorityMap.set(actualKey, priority);

View File

@@ -277,7 +277,7 @@ export const TrackerActiveCard = ({
settingValue={`${trackRecord.lastChapterRead}/${trackRecord.totalChapters}`}
value={trackRecord.lastChapterRead}
minValue={0}
maxValue={Infinity}
maxValue={Number.MAX_SAFE_INTEGER}
valueUnit=""
handleUpdate={(lastChapterRead) => updateTrackerBind({ lastChapterRead })}
/>