mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 23:06:16 -04: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…
Add table
Add a link
Reference in a new issue