diff --git a/package.json b/package.json index 329f662..013cac6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aelf-command", - "version": "0.1.47-beta.11", + "version": "0.1.48", "description": "A CLI tools for AElf", "main": "src/index.js", "type": "module", diff --git a/src/utils/utils.js b/src/utils/utils.js index 5299542..f9c510c 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -225,6 +225,9 @@ function parseJSON(str = '') { let result = null; try { result = JSON.parse(str); + if (typeof result === 'number' && /^-?\d+(\.\d+)?[eE][+-]?\d+$/.test(String(result))) { + result = str; + } } catch (e) { result = str; }