Skip to content

Commit 812fc6c

Browse files
Jentobrschristian
andauthored
Update src/router.js
Co-authored-by: Ryan Christian <[email protected]>
1 parent 5250fa2 commit 812fc6c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/router.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ const UPDATE = (state, url) => {
1616
return state;
1717
}
1818

19-
const elements = url.composedPath();
20-
const link = elements.find(el => el.tagName?.toLowerCase() === 'a' && el.href),
19+
const link = url.composedPath().find(el => el.nodeName == 'A' && el.href),
2120
href = link && link.getAttribute('href');
2221
if (
2322
!link ||

0 commit comments

Comments
 (0)