1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-06 06:08:00 +00:00

fix: app config strings starting with a number are parsed incorrectly

This commit is contained in:
Elias Schneider
2025-02-18 21:36:08 +01:00
parent 339837bec4
commit 816c198a42

View File

@@ -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;