Skip to content

Commit

Permalink
Fix incorrect handling of single array argument in the backend call.
Browse files Browse the repository at this point in the history
Earlier code change was probably an incorrect fix for another bug in
RESTProcess that has since been fixed. For Ravel #655.
  • Loading branch information
highperformancecoder committed Jan 4, 2025
1 parent 002c73b commit 4e4eefa
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions gui-js/apps/minsky-electron/src/app/backend-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ export async function backend(command: string, ...args: any[]): Promise<any> {
return {};
}
try {
var arg='';
if (args.length>1) {
arg=JSON5.stringify(args, {quote: '"'});
} else if (args.length===1) {
arg=JSON5.stringify(args[0], {quote: '"'});
}
var arg=JSON5.stringify(args, {quote: '"'});
CppClass.record(`${command} ${arg}`);

let response=await restService.call(command, arg);
Expand Down

0 comments on commit 4e4eefa

Please sign in to comment.