From 23dbc24d53a3dd7019739112b4b3bfc53a0609ad Mon Sep 17 00:00:00 2001 From: iiijarvis Date: Fri, 25 Oct 2019 11:57:23 +0800 Subject: [PATCH] refactor: delete redundant code (#3010) --- src/history/hash.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/history/hash.js b/src/history/hash.js index 25a670fcb..6f2a81a36 100644 --- a/src/history/hash.js +++ b/src/history/hash.js @@ -125,9 +125,7 @@ export function getHash (): string { href = decodeURI(href.slice(0, hashIndex)) + href.slice(hashIndex) } else href = decodeURI(href) } else { - if (searchIndex > -1) { href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex) - } } return href