Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions packages/sandbox-hooks/url-listeners.js
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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);
Expand Down