Skip to content
This repository was archived by the owner on Sep 20, 2022. It is now read-only.

Commit a049206

Browse files
Update packages/mdx-remote/src/format-mdx-error.ts
Co-authored-by: Dimitri POSTOLOV <[email protected]>
1 parent 3ce5602 commit a049206

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mdx-remote/src/format-mdx-error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function parsePositionInformationFromErrorMessage(message: string): { start: { l
1111

1212
if (match) {
1313
// take the last match, that seems to be the most reliable source of the error.
14-
const lastMatch = match.slice(-1)[0];
14+
const lastMatch = match[match.length - 1];
1515

1616
const [line, column] = lastMatch.split('-')[0].split(':');
1717

0 commit comments

Comments
 (0)