Skip to content

Commit efb29b3

Browse files
committed
Cleanup unnecessary prop rename
1 parent 252ca3e commit efb29b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/components/DraftailEditor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,18 +257,18 @@ class DraftailEditor extends Component<Props, State> {
257257

258258
this.renderSource = this.renderSource.bind(this);
259259

260-
const { editorState: editorStateProp, rawContentState } = props;
260+
const { editorState, rawContentState } = props;
261261

262262
this.state = {
263263
readOnlyState: false,
264264
hasFocus: false,
265265
sourceOptions: null,
266266
};
267267

268-
// If editorState is not used as a prop, create it in local state from rawContentState.
269-
if (editorStateProp !== null) {
268+
if (editorState !== null) {
270269
this.getEditorState = this.getEditorStateProp.bind(this);
271270
} else {
271+
// If editorState is not used as a prop, create it in local state from rawContentState.
272272
this.state.editorState = createEditorStateFromRaw(rawContentState);
273273
this.getEditorState = this.getEditorStateState.bind(this);
274274
}

0 commit comments

Comments
 (0)