Skip to content

Commit 04c39ea

Browse files
author
Anton Eriksson
committed
fix(js): Correctly parse clu-files without header
1 parent 5480ef8 commit 04c39ea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

interfaces/js/parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mapequation/infomap-parser",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Infomap output parser",
55
"author": {
66
"name": "mapequation",

interfaces/js/parser/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,11 @@ function parseNodeHeader(file: string | string[]): string[] {
427427
if (!isNumeric(fields)) bail(line);
428428

429429
switch (fields.length) {
430-
case 4:
430+
case 3:
431431
return ["node_id", "module", "flow"];
432-
case 5:
432+
case 4:
433433
return ["state_id", "module", "flow", "node_id"];
434-
case 6:
434+
case 5:
435435
return ["state_id", "module", "flow", "node_id", "layer_id"];
436436
default:
437437
bail(line);

0 commit comments

Comments
 (0)