Skip to content

Commit 4300e1c

Browse files
committed
fix: 標準履修年次が1つの時に空配列になる
1 parent bb33a4f commit 4300e1c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twinte-parser",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "Twinte内部で使用するために開発されたKdBパーサ",
55
"private": false,
66
"main": "dist/index.js",

src/parser.ts

+2
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ const analyzeYear = (str: string): number[] => {
132132
}
133133
} else if (//.test(str)) {
134134
res.push(...str.split('・').map((e) => Number(e)))
135+
} else {
136+
res.push(parseInt(str))
135137
}
136138
return res
137139
}

0 commit comments

Comments
 (0)