From a6770dd58ae775b5faf4b76bd5a06ce4262617cf Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Thu, 11 Mar 2021 16:27:03 +0100 Subject: [PATCH] refactor(guards): remove bind usage MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Sorry Ben... 😅 --- src/router.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router.ts b/src/router.ts index d2c421a7..14158f6d 100644 --- a/src/router.ts +++ b/src/router.ts @@ -1167,14 +1167,14 @@ function extractChangingRecords( for (let i = 0; i < len; i++) { const recordFrom = from.matched[i] if (recordFrom) { - if (to.matched.find(isSameRouteRecord.bind(null, recordFrom))) + if (to.matched.find(record => isSameRouteRecord(record, recordFrom))) updatingRecords.push(recordFrom) else leavingRecords.push(recordFrom) } const recordTo = to.matched[i] if (recordTo) { // the type doesn't matter because we are comparing per reference - if (!from.matched.find(isSameRouteRecord.bind(null, recordTo))) { + if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) { enteringRecords.push(recordTo) } } -- 2.47.2