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

[Client Step 6.4] #24

Closed
killjoy2013 opened this issue Aug 14, 2019 · 2 comments
Closed

[Client Step 6.4] #24

killjoy2013 opened this issue Aug 14, 2019 · 2 comments

Comments

@killjoy2013
Copy link

Hi,

 window.location = {
      href: '/',
    };

produces below error;

Type '{ href: string; }' is missing the following properties from type 'Location': ancestorOrigins, hash, host, hostname, and 8 more.ts(2740)

@smartapp-ep
Copy link

I changed it to window.location.href = '/', not sure if that's what the tutorial intended

@Urigo
Copy link
Owner

Urigo commented Mar 31, 2020

I've changed to it:

    delete window.location;
    window = Object.create(window);
    Object.defineProperty(window, 'location', {
      value: {
        href: '/',
      },
      writable: true,
    });

Based on this answer.

Will push the new version later today

@Urigo Urigo closed this as completed Mar 31, 2020
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

3 participants