From 86571e49f2cd13cab2c8a4a81576762d08033578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 14 Jan 2018 20:55:51 +0100 Subject: [PATCH] State: also pass state to setPath() --- src/index.js | 2 +- src/state.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 282aca46..d9491d43 100644 --- a/src/index.js +++ b/src/index.js @@ -158,7 +158,7 @@ function onload2 (initState) { state.update() } -window.setPath = function (path) { +window.setPath = function (path, state) { currentPath = path if (!path) { diff --git a/src/state.js b/src/state.js index 108de37b..d61ed8f4 100644 --- a/src/state.js +++ b/src/state.js @@ -29,7 +29,7 @@ function get () { function apply (state) { // path - setPath(state.path) + setPath(state.path, state) // location if (state.lat && state.lon && state.zoom) {