Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set property scrollRestoration of [object History] which has only a getter #126

Closed
vizath opened this issue Jan 11, 2018 · 1 comment

Comments

@vizath
Copy link
Contributor

vizath commented Jan 11, 2018

I get this error within Bugsnag, all coming from 66.249.88.*, or 66.102.6.*, which seems to be Google (google-proxy-66-249-88-154.google.com (https://mxtoolbox.com/SuperTool.aspx?action=ptr%3a%09+66.249.88.152)).

It seems to be a robot that would execute JS on pages, using a real browser user-agent (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36). Could be the Google pre-fetch?

Anyways, the issue is more about the noise than an issue for us since our app is behind a login, but I don't know what could be the side effect of that error for public websites.

Add a try catch in there ?

if ('scrollRestoration' in window.history) {
this._oldScrollRestoration = window.history.scrollRestoration;
window.history.scrollRestoration = 'manual';
} else {
this._oldScrollRestoration = null;
}

@taion
Copy link
Owner

taion commented Jan 11, 2018

Sounds good. Want to PR it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants