Remove "Infinity" usage
This commit is contained in:
@@ -49,7 +49,7 @@ export class Queue {
|
|||||||
fn: () => PromiseLike<T> | T,
|
fn: () => PromiseLike<T> | T,
|
||||||
priority: QueuePriority = Priority.NORMAL,
|
priority: QueuePriority = Priority.NORMAL,
|
||||||
): { key: string; promise: Promise<T> } {
|
): { 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}`;
|
const actualKey = `${key}_${this.counter}`;
|
||||||
|
|
||||||
this.pendingKeyToPriorityMap.set(actualKey, priority);
|
this.pendingKeyToPriorityMap.set(actualKey, priority);
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ export const TrackerActiveCard = ({
|
|||||||
settingValue={`${trackRecord.lastChapterRead}/${trackRecord.totalChapters}`}
|
settingValue={`${trackRecord.lastChapterRead}/${trackRecord.totalChapters}`}
|
||||||
value={trackRecord.lastChapterRead}
|
value={trackRecord.lastChapterRead}
|
||||||
minValue={0}
|
minValue={0}
|
||||||
maxValue={Infinity}
|
maxValue={Number.MAX_SAFE_INTEGER}
|
||||||
valueUnit=""
|
valueUnit=""
|
||||||
handleUpdate={(lastChapterRead) => updateTrackerBind({ lastChapterRead })}
|
handleUpdate={(lastChapterRead) => updateTrackerBind({ lastChapterRead })}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user