mirror of
https://github.com/gchq/CyberChef
synced 2025-01-04 00:38:41 +00:00
better boolean statement
This commit is contained in:
parent
c79bf5caaf
commit
78d35ecec3
1 changed files with 1 additions and 5 deletions
|
@ -113,12 +113,8 @@ class FromBase85 extends Operation {
|
||||||
.split("")
|
.split("")
|
||||||
.map((chr, idx) => {
|
.map((chr, idx) => {
|
||||||
const digit = alphabet.indexOf(chr);
|
const digit = alphabet.indexOf(chr);
|
||||||
if (digit < 0 || digit > 84) {
|
if ((digit < 0 || digit > 84) && chr !== "z") {
|
||||||
if (chr === "z") {
|
|
||||||
// Pass (Ignore character)
|
|
||||||
} else {
|
|
||||||
throw `Invalid character '${chr}' at index ${i + idx}`;
|
throw `Invalid character '${chr}' at index ${i + idx}`;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return digit;
|
return digit;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue