diff --git a/lib/history.js b/lib/history.js index efc3b11..a01805e 100644 --- a/lib/history.js +++ b/lib/history.js @@ -8,11 +8,12 @@ module.exports = history function history (cb) { assert.equal(typeof cb, 'function', 'sheet-router/history: cb must be a function') window.onpopstate = function () { - cb({ + var obj = { pathname: document.location.pathname, search: document.location.search, href: document.location.href, hash: document.location.hash - }) + } + cb(obj) } } diff --git a/package.json b/package.json index f6965e0..2b9d839 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "node-zopfli": "^2.0.2", "pretty-bytes-cli": "^2.0.0", "spok": "^0.8.1", - "standard": "^9.0.1", + "standard": "^10.0.0", "tape": "^4.6.3", "uglifyify": "^3.0.4", "uglifyjs": "^2.4.10",