Skip to content

Commit

Permalink
Fix mometary emptiness on start/stop editing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZebulanStanphill committed Sep 26, 2020
1 parent 15cbe4f commit a2f7f0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/block/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
ToolbarGroup,
} from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
import { useEffect, useState } from '@wordpress/element';
import { useLayoutEffect, useState } from '@wordpress/element';
import { __ } from '@wordpress/i18n';

/**
Expand Down Expand Up @@ -112,7 +112,7 @@ export default function ReusableBlockEdit( {
reusableBlock && isEditing ? blocks : null
);

useEffect( () => {
useLayoutEffect( () => {
if ( ! reusableBlock ) {
fetchReusableBlock();
}
Expand Down

0 comments on commit a2f7f0b

Please sign in to comment.