mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Fix for NaN preferences breaking things.
This commit is contained in:
parent
1c5d0f7017
commit
f9bd43a4c3
1 changed files with 2 additions and 1 deletions
|
@ -159,7 +159,8 @@ const mixin = {
|
|||
(value = new URLSearchParams(window.location.search).get(key)) !== null ||
|
||||
(this.testLocalStorage && (value = localStorage.getItem(key)) !== null)
|
||||
) {
|
||||
return Number(value);
|
||||
const num = Number(value);
|
||||
return isNaN(num) ? defaultVal : num;
|
||||
} else return defaultVal;
|
||||
},
|
||||
getPreferenceJSON(key, defaultVal) {
|
||||
|
|
Loading…
Reference in a new issue