Skip to content

Commit

Permalink
Merge pull request #759 from intechstudio/bug/Brackets
Browse files Browse the repository at this point in the history
🚩 PR: Fixed bracket replacement
  • Loading branch information
SukuWc authored Jun 26, 2024
2 parents db75507 + ef0dfd7 commit 0434eaf
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 0434eaf

Please sign in to comment.