Skip to content

Commit

Permalink
identifier fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Dec 25, 2019
1 parent 5fcb1d4 commit fb3dbcb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/block-editor/src/components/rich-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ function RichTextWrapper( {
...experimentalProps
} ) {
const instanceId = useInstanceId( RichTextWrapper );

identifier = identifier || instanceId;

const ref = useRef();
const {
clientId,
Expand Down Expand Up @@ -168,7 +171,7 @@ function RichTextWrapper( {
didAutomaticChange,
disabled,
shouldBlurOnUnmount,
} = useSelect( selector, [ clientId, instanceId, identifier, originalIsSelected ] );
} = useSelect( selector, [ clientId, identifier, originalIsSelected ] );
const {
__unstableMarkLastChangeAsPersistent,
enterFormattedText,
Expand Down

0 comments on commit fb3dbcb

Please sign in to comment.