mirror of
https://github.com/gchq/CyberChef.git
synced 2025-06-14 18:25:16 -04:00
Merge 8ffa6ace2f
into c57556f49f
This commit is contained in:
commit
f368cf2b89
1 changed files with 3 additions and 1 deletions
2
src/core/Ingredient.mjs
Executable file → Normal file
2
src/core/Ingredient.mjs
Executable file → Normal file
|
@ -116,6 +116,8 @@ class Ingredient {
|
||||||
}
|
}
|
||||||
case "number":
|
case "number":
|
||||||
if (data === null) return data;
|
if (data === null) return data;
|
||||||
|
if (isNaN(data)) throw "Ingredient can not be empty.";
|
||||||
|
|
||||||
number = parseFloat(data);
|
number = parseFloat(data);
|
||||||
if (isNaN(number)) {
|
if (isNaN(number)) {
|
||||||
const sample = Utils.truncate(data.toString(), 10);
|
const sample = Utils.truncate(data.toString(), 10);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue