]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
refactor: replace spread with assign
authorEduardo San Martin Morote <posva13@gmail.com>
Mon, 24 Aug 2020 13:05:10 +0000 (15:05 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 24 Aug 2020 13:05:10 +0000 (15:05 +0200)
src/router.ts

index 9850dd8eaced217b0fdd4a5695ae38306f93cdb2..31d702476dfbbd593c9d69124b19c03549319074 100644 (file)
@@ -243,7 +243,7 @@ export function createRouter(options: RouterOptions): Router {
   ): RouteLocation & { href: string } {
     // const objectLocation = routerLocationAsObject(rawLocation)
     // we create a copy to modify it later
-    currentLocation = { ...(currentLocation || currentRoute.value) }
+    currentLocation = assign({}, currentLocation || currentRoute.value)
     if (typeof rawLocation === 'string') {
       let locationNormalized = parseURL(
         parseQuery,