Skip to content

Commit c4aa544

Browse files
committed
fix: crash when content contains a period connected with a quotation marks
1 parent f2ba038 commit c4aa544

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rules/case-abbrs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const matchAbbr = (
4949
// get the next matching abbr chars by removing the last char and filtering
5050
const matchedAbbrChars = reversedAbbrChars
5151
.filter(
52-
(abbr) => abbr[0].toLowerCase() === tokenBefore.value.toLowerCase()
52+
(abbr) => tokenBefore.value && abbr[0].toLowerCase() === tokenBefore.value.toLowerCase()
5353
)
5454
.map((abbr) => abbr.slice(1))
5555

0 commit comments

Comments
 (0)