diff --git a/packages/sandbox-hooks/url-listeners.js b/packages/sandbox-hooks/url-listeners.js index 8e354cf2188..4aab03b70c1 100644 --- a/packages/sandbox-hooks/url-listeners.js +++ b/packages/sandbox-hooks/url-listeners.js @@ -1,5 +1,10 @@ import { dispatch, isStandalone, listen } from 'codesandbox-api'; +const origHistoryProto = window.history.__proto__; // eslint-disable-line no-proto +const historyList = []; +let historyPosition = -1; +let disableNextHashChange = false; + function sendUrlChange(url) { dispatch({ type: 'urlchange', @@ -9,13 +14,6 @@ function sendUrlChange(url) { }); } -/* eslint-disable no-console */ - -const origHistoryProto = window.history.__proto__; // eslint-disable-line no-proto -const historyList = []; -let historyPosition = -1; -let disableNextHashChange = false; - function pushHistory(url, state) { // remove "future" locations historyList.splice(historyPosition + 1);