1
0
Fork 0

Support fractional sales backlog values in localStorage #27

Closed
opened 2025-03-02 02:30:39 +00:00 by ishawng · 1 comment
ishawng commented 2025-03-02 02:30:39 +00:00 (Migrated from github.com)

Currently, when setting the max sales backlog to a fractional value (e.g., 0.1) in the options, it works initially. However, on page refresh, the max sales backlog resets to 7. This happens because Number.parseInt(0.1) returns 0, which causes it to fall back to the default value.

A simple fix would be to use parseFloat instead of parseInt when retrieving the value from localStorage, allowing fractional values to be preserved.

Would it be possible to update this behavior?

Currently, when setting the max sales backlog to a fractional value (e.g., `0.1`) in the options, it works initially. However, on page refresh, the max sales backlog resets to `7`. This happens because `Number.parseInt(0.1)` returns `0`, which causes it to fall back to the default value. A simple fix would be to use `parseFloat` instead of `parseInt` when retrieving the value from `localStorage`, allowing fractional values to be preserved. Would it be possible to update this behavior?
ianrenton commented 2025-03-02 09:32:05 +00:00 (Migrated from github.com)

No problem, that's all done!

No problem, that's all done!
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ian/Skyblock-Bazaar-Flipping-Calculator#27
No description provided.