From fda1a62e9927439f0a8c369879a35bfe4a68dfc2 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Fri, 1 May 2020 13:13:03 +0200 Subject: [PATCH] chore: remove unused variable --- src/history/html5.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/history/html5.ts b/src/history/html5.ts index 6ec400da..3a0ff3f3 100644 --- a/src/history/html5.ts +++ b/src/history/html5.ts @@ -81,10 +81,7 @@ function useHistoryListeners( return } - const deltaFromCurrent = fromState - ? state.position - fromState.position - : '' - const delta = deltaFromCurrent || 0 + const delta = fromState ? state.position - fromState.position : 0 // console.log({ deltaFromCurrent }) // Here we could also revert the navigation by calling history.go(-delta) // this listener will have to be adapted to not trigger again and to wait for the url -- 2.47.3