|
|
@@ -32,7 +32,11 @@
|
|
|
warningDisplayed = true;
|
|
|
console.warn("SingleFile is hooking the history.pushState API to detect navigation."); // eslint-disable-line no-console
|
|
|
}
|
|
|
- dispatchEvent(new CustomEvent("single-file-push-state", { detail: { state, title, url } }));
|
|
|
+ try {
|
|
|
+ dispatchEvent(new CustomEvent("single-file-push-state", { detail: { state, title, url } }));
|
|
|
+ } catch (error) {
|
|
|
+ // ignored
|
|
|
+ }
|
|
|
pushState.call(history, state, title, url);
|
|
|
};
|
|
|
history.pushState.toString = function () { return "function pushState() { [native code]"; };
|