mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
fix bug where no input leads to error in console
This commit is contained in:
parent
54e559c5a6
commit
6b75ba8903
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ class AddLineNumbers extends Operation {
|
|||
run(input, args) {
|
||||
const lines = input.split("\n"),
|
||||
width = lines.length.toString().length;
|
||||
const offset = parseInt(args[0], 10);
|
||||
const offset = args[0] ? parseInt(args[0], 10) : 0;
|
||||
let output = "";
|
||||
|
||||
for (let n = 0; n < lines.length; n++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue