Skip to content

Commit

Permalink
Fixed bracket replacement for code
Browse files Browse the repository at this point in the history
  • Loading branch information
elsoazemelet committed Jun 24, 2024
1 parent db75507 commit ef0dfd7
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/renderer/config-blocks/_script_parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,7 @@ export class Script {
}

static toScript({ short, array = [] }) {
let code = short; // prepend with type
const _unformatted = JSON.stringify(array);
[..._unformatted].forEach((e) => {
if (e == "[") {
code += "(";
} else if (e == "]") {
code += ")";
} else if (e == '"') {
/* no return */
} else {
code += e.trim();
}
});
const code = `${short}(${array.join(",")})`;
return code;
}
}

0 comments on commit ef0dfd7

Please sign in to comment.