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

Fix react17 useRef error #208

Merged
merged 1 commit into from
Nov 11, 2020
Merged

Fix react17 useRef error #208

merged 1 commit into from
Nov 11, 2020

Conversation

Cyver0
Copy link
Contributor

@Cyver0 Cyver0 commented Nov 5, 2020

See https://reactjs.org/blog/2020/08/10/react-v17-rc.html#potential-issues
Since react 17 this line lead into an error.

image

@niuware
Copy link
Owner

niuware commented Nov 6, 2020

If this is the case, then this PR only fixes one place where the editor reference is used. I think is better to add undefined checks in those other places too. Gonna take a look into that.

@TrejGun
Copy link

TrejGun commented Nov 11, 2020

i have this error too, please fix

@niuware niuware changed the base branch from master to check-editor-ref-nullability November 11, 2020 06:35
@niuware niuware merged commit af1bdfb into niuware:check-editor-ref-nullability Nov 11, 2020
niuware added a commit that referenced this pull request Nov 11, 2020
* fix(react17): ref.current error (#208)

Co-authored-by: Nico Bressler <nico.bressler@2003-012019.fritz.box>

* Add nullability check for editorRef's editor property

Co-authored-by: Cyver <38687961+Cyver0@users.noreply.github.com>
Co-authored-by: Nico Bressler <nico.bressler@2003-012019.fritz.box>
@niuware
Copy link
Owner

niuware commented Nov 11, 2020

This is included in version 1.26.2.

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

Successfully merging this pull request may close these issues.

3 participants