Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix unreliablewindow anddocument detection#246

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
istarkov merged 3 commits intogoogle-map-react:masterfromviktorbezdek:master
Sep 23, 2016
Merged

Fix unreliablewindow anddocument detection#246

istarkov merged 3 commits intogoogle-map-react:masterfromviktorbezdek:master
Sep 23, 2016

Conversation

viktorbezdek
Copy link
Contributor

The method used for detecting DOM availability was sloppy and breaks server side rendering in some cases. This new approach fix cases when global variable window is defined in NodeJS by checking presence ofwindow.document andwindow.document.createElement which are used in element resize detection.

revolunet reacted with thumbs up emoji
Signed-off-by: Viktor Bezděk <viktor.bezdek@siteone.cz>
…ts published to fix ssr issuesSigned-off-by: Viktor Bezděk <viktor.bezdek@siteone.cz>
@istarkov
Copy link
Collaborator

istarkov commentedSep 22, 2016
edited
Loading

Thank you!

  1. Please remove all .gitignore files,https://github.com/istarkov/google-map-react/blob/master/.gitignore does your git tool not support that?
  2. was sloppy and breaks server side rendering in some cases - please provide that cases and why just typeof window is not enough.

@viktorbezdek
Copy link
ContributorAuthor

  1. Dammit, I committed compiled files to my fork just to be able to use my fork as a dependency temporarily before you publish the patch. Should have make topic branch for the pull request.
  2. One of the cases is quite simple - my application have to use private module that I have no control of. This module requires global variable window with some unrelated data, sotypeof window !== 'undefined' become truthy and SSR breaks. New solution only makes deeper more robust checking. There is another, more tricky, case but I have to debug my app I bit more to make sure it's not issue on my side.

I'll fix files in the repo in sec. Will let you know.

@viktorbezdek
Copy link
ContributorAuthor

The last commit is reverted. If you accept the pull request, please publish the patch asap.

@istarkovistarkov merged commit94eac51 intogoogle-map-react:masterSep 23, 2016
@istarkov
Copy link
Collaborator

Thank you!!! Will publish today.

@lock
Copy link

lockbot commentedDec 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@locklockbot locked asresolvedand limited conversation to collaboratorsDec 1, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@viktorbezdek@istarkov

[8]ページ先頭

©2009-2025 Movatter.jp