mirror of
https://github.com/nikdoof/pocket-id.git
synced 2025-12-22 13:59:24 +00:00
fix: app config strings starting with a number are parsed incorrectly
This commit is contained in:
@@ -95,7 +95,7 @@ export default class AppConfigService extends APIService {
|
||||
return true;
|
||||
} else if (value === 'false') {
|
||||
return false;
|
||||
} else if (!isNaN(parseFloat(value))) {
|
||||
} else if (/^-?\d+(\.\d+)?$/.test(value)) {
|
||||
return parseFloat(value);
|
||||
} else {
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user