-
Notifications
You must be signed in to change notification settings - Fork 393
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 read property 'matches' of null #666
Comments
After further investigation, this also breaks the |
Load your scripts below the the body not in the head :) |
@jquense So you're just going to bake this "asynchronous code dependencies implemented inside synchronous code dependencies" problem into the loading requirements of the entire This requirement will trickle on into forcing the entire Webpack loader to be forced down below the body, which I can't do because I have a bunch of horrible legacy code that I need to inject localisation code for ASAP, before some cowboy coder's inline script tags start firing. This kind of "undocumented dependencies that are just assumed to be there already immediately during first execution" coding style is exactly what forced me to need to move all my script tags up to the top of the head in the first place! |
I understand you have issues here. I'm happy to take PRs. The problem is not async code nor a race condition. it's that the document.body needs to exist in order to feature detect DOM functionality. |
@jquense But it is asynchronous code,
I understand that it's best practises to put scripts below the body. If I could do it, I would. I understand that most people probably don't encounter this issue, because they would be optimising their code and loading it after the body… but it's absolutely a textbook definition of a race condition. |
@jquense PR created: react-bootstrap/dom-helpers#33 |
Hi @jquense, I noticed that you've approved the PR react-bootstrap/dom-helpers#33 from @vdh. Thank you both! Could you please also update the npm package in order to use the latest version of this package in react-widgets? Thanks in advance, Denis |
I am unable to use the current version of this package available via I am new to using package managers. If I try to add this via I posted a general question of use of package managers here because I am not sure if this is an issue with this repository or my use of yarn |
Hey @jquense, I noticed that you've updated dom-helpers and bumped the version of react-widgets. |
Due to the addition of
dom-helpers/query/matches
insrc/utils/interaction.js
it's caused this race condition error:Which appears to be this
dom-helpers
issue: react-bootstrap/dom-helpers#29The text was updated successfully, but these errors were encountered: