Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Fix Uncaught TypeError: Cannot read property 'nodeType' of null at ed… (
Browse files Browse the repository at this point in the history
#2330)

Summary:
#2204
Pull Request resolved: #2330

Reviewed By: claudiopro

Differential Revision: D20582792

Pulled By: mrkev

fbshipit-source-id: d96beaa1617ef82ba5663637f5daad254d9b17f7
  • Loading branch information
koistya authored and facebook-github-bot committed Mar 24, 2020
1 parent dc8bfbb commit db3216d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/component/handlers/edit/editOnInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ function editOnInput(editor: DraftEditor, e: SyntheticInputEvent<>): void {

const {anchorNode, isCollapsed} = domSelection;
const isNotTextOrElementNode =
anchorNode.nodeType !== Node.TEXT_NODE &&
anchorNode.nodeType !== Node.ELEMENT_NODE;
anchorNode?.nodeType !== Node.TEXT_NODE &&
anchorNode?.nodeType !== Node.ELEMENT_NODE;

if (isNotTextOrElementNode) {
// TODO: (t16149272) figure out context for this change
Expand Down

0 comments on commit db3216d

Please sign in to comment.