Skip to content

Commit 08ac23a

Browse files
committed
fix: recommendedGradeにnullが入る
1 parent 4300e1c commit 08ac23a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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.1",
3+
"version": "2.1.2",
44
"description": "Twinte内部で使用するために開発されたKdBパーサ",
55
"private": false,
66
"main": "dist/index.js",

src/parser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ const analyzeYear = (str: string): number[] => {
132132
}
133133
} else if (//.test(str)) {
134134
res.push(...str.split('・').map((e) => Number(e)))
135-
} else {
135+
} else if (!Number.isNaN(parseInt(str))) {
136136
res.push(parseInt(str))
137137
}
138138
return res

0 commit comments

Comments
 (0)