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 Jul 17, 2020
1 parent ee39857 commit 62852c5
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 @@ -14,7 +14,7 @@ import {
import { parse, serialize } from '@wordpress/blocks';
import { Placeholder, Spinner, Disabled } 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 @@ -103,7 +103,7 @@ export default function ReusableBlockEdit( {
reusableBlock && isEditing ? blocks : null
);

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

0 comments on commit 62852c5

Please sign in to comment.