]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: remove unused variable
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 1 May 2020 11:13:03 +0000 (13:13 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 1 May 2020 11:13:03 +0000 (13:13 +0200)
src/history/html5.ts

index 6ec400daaa9a63e8eb0d80947b3dd0fc373b3b9e..3a0ff3f3551b36af8c07bfc8e7cb475573b7f90e 100644 (file)
@@ -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