Skip to content

Commit a292318

Browse files
author
Anton Eriksson
committed
fix(js): Output arguments should not be required to be an array
1 parent 6c597bb commit a292318

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

interfaces/js/src/arguments.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface Arguments
3333
outName: string;
3434
noFileOutput: boolean;
3535
cluLevel: number;
36-
output: OutputFormats[];
36+
output: OutputFormats | OutputFormats[];
3737
hideBipartiteNodes: boolean;
3838
// algorithm
3939
twoLevel: boolean;
@@ -111,7 +111,10 @@ export default function argumentsToString(args: Arguments) {
111111

112112
if (args.cluLevel != null) result += " --clu-level " + args.cluLevel;
113113

114-
if (args.output != null) result += " -o " + args.output.join(",");
114+
if (args.output != null) {
115+
if (typeof args.output === "string") result += " -o " + args.output;
116+
else result += " -o " + args.output.join(",");
117+
}
115118

116119
if (args.hideBipartiteNodes) result += " --hide-bipartite-nodes";
117120

0 commit comments

Comments
 (0)