From 7c87d4d41f7d44b6408de7b6e32c713ee2870a91 Mon Sep 17 00:00:00 2001 From: koksnuss Date: Tue, 19 May 2020 23:44:37 +0200 Subject: [PATCH] parse circulation correct on the client side --- coinmanager/coinc/static/coinc/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coinmanager/coinc/static/coinc/main.js b/coinmanager/coinc/static/coinc/main.js index 0c10001..2b11a5d 100644 --- a/coinmanager/coinc/static/coinc/main.js +++ b/coinmanager/coinc/static/coinc/main.js @@ -211,8 +211,8 @@ function save_settings() { settings['found_on'] = found_on; } - let circulation = Number(String($('#circulation').val()).replace('/./g', '')); - if (isNaN(parseInt(circulation)) || circulation < 0 || circulation > 1000000000) { + let circulation = parseInt(String($('#circulation').val()).split('.').join('')); + if (isNaN(circulation) || circulation < 0 || circulation > 1000000000) { settings['circulation'] = 0; } else { settings['circulation'] = circulation;