mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -04:00
Fix ingredient type conversion for null number
This commit is contained in:
parent
55dddd3ef9
commit
9a3464a5ec
1 changed files with 1 additions and 0 deletions
|
@ -113,6 +113,7 @@ class Ingredient {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
case "number":
|
case "number":
|
||||||
|
if (data === null) return 0;
|
||||||
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