Skip to content

Commit a6770dd

Browse files
committed
refactor(guards): remove bind usage
Sorry Ben... 😅
1 parent 0048b9b commit a6770dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,14 +1167,14 @@ function extractChangingRecords(
11671167
for (let i = 0; i < len; i++) {
11681168
const recordFrom = from.matched[i]
11691169
if (recordFrom) {
1170-
if (to.matched.find(isSameRouteRecord.bind(null, recordFrom)))
1170+
if (to.matched.find(record => isSameRouteRecord(record, recordFrom)))
11711171
updatingRecords.push(recordFrom)
11721172
else leavingRecords.push(recordFrom)
11731173
}
11741174
const recordTo = to.matched[i]
11751175
if (recordTo) {
11761176
// the type doesn't matter because we are comparing per reference
1177-
if (!from.matched.find(isSameRouteRecord.bind(null, recordTo))) {
1177+
if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {
11781178
enteringRecords.push(recordTo)
11791179
}
11801180
}

0 commit comments

Comments
 (0)