Browse Source

State: also pass state to setPath()

master
parent
commit
86571e49f2
  1. 2
      src/index.js
  2. 2
      src/state.js

2
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) {

2
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) {

Loading…
Cancel
Save