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

Commit

Permalink
Remove findDOMNode from getContentEditableContainer
Browse files Browse the repository at this point in the history
Reviewed By: mrkev

Differential Revision: D19524937

fbshipit-source-id: 3fba5f71d7cdc725e00f3e40956b9f036949c7c7
  • Loading branch information
sebmarkbage authored and facebook-github-bot committed Jan 23, 2020
1 parent b051fc1 commit 9d587d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 58 deletions.
55 changes: 0 additions & 55 deletions src/component/utils/__tests__/getContentEditableContainer-test.js

This file was deleted.

4 changes: 1 addition & 3 deletions src/component/utils/getContentEditableContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@

import type DraftEditor from 'DraftEditor.react';

const ReactDOM = require('ReactDOM');

const invariant = require('invariant');
const isHTMLElement = require('isHTMLElement');

function getContentEditableContainer(editor: DraftEditor): HTMLElement {
const editorNode = ReactDOM.findDOMNode(editor.editorContainer);
const editorNode = editor.editorContainer;
invariant(editorNode, 'Missing editorNode');
invariant(
isHTMLElement(editorNode.firstChild),
Expand Down

0 comments on commit 9d587d9

Please sign in to comment.