Skip to content

Commit

Permalink
fix: 標準履修年次が1つの時に空配列になる
Browse files Browse the repository at this point in the history
  • Loading branch information
SIY1121 committed Mar 24, 2021
1 parent bb33a4f commit 4300e1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "twinte-parser",
"version": "2.1.0",
"version": "2.1.1",
"description": "Twinte内部で使用するために開発されたKdBパーサ",
"private": false,
"main": "dist/index.js",
Expand Down
2 changes: 2 additions & 0 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ const analyzeYear = (str: string): number[] => {
}
} else if (//.test(str)) {
res.push(...str.split('・').map((e) => Number(e)))
} else {
res.push(parseInt(str))
}
return res
}
Expand Down

0 comments on commit 4300e1c

Please sign in to comment.