Skip to content

Commit 286281c

Browse files
committed
Block Editor: Rename block context in BlockListBlock
1 parent 229f0b0 commit 286281c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/block-editor/src/components/block-list/block-wrapper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { useSelect, useDispatch } from '@wordpress/data';
2626
import { isInsideRootBlock } from '../../utils/dom';
2727
import useMovingAnimation from './moving-animation';
2828
import { Context, BlockNodes } from './root-container';
29-
import { BlockContext } from './block';
29+
import { BlockListBlockContext } from './block';
3030
import ELEMENTS from './block-elements';
3131

3232
const BlockComponent = forwardRef(
@@ -50,7 +50,7 @@ const BlockComponent = forwardRef(
5050
mode,
5151
blockTitle,
5252
wrapperProps,
53-
} = useContext( BlockContext );
53+
} = useContext( BlockListBlockContext );
5454
const { initialPosition } = useSelect(
5555
( select ) => {
5656
if ( ! isSelected ) {

packages/block-editor/src/components/block-list/block.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import BlockCrashBoundary from './block-crash-boundary';
3131
import BlockHtml from './block-html';
3232
import { Block } from './block-wrapper';
3333

34-
export const BlockContext = createContext();
34+
export const BlockListBlockContext = createContext();
3535

3636
function BlockListBlock( {
3737
mode,
@@ -167,7 +167,7 @@ function BlockListBlock( {
167167
const memoizedValue = useMemo( () => value, Object.values( value ) );
168168

169169
return (
170-
<BlockContext.Provider value={ memoizedValue }>
170+
<BlockListBlockContext.Provider value={ memoizedValue }>
171171
<BlockCrashBoundary onError={ onBlockError }>
172172
{ isValid && lightBlockWrapper && (
173173
<>
@@ -199,7 +199,7 @@ function BlockListBlock( {
199199
<BlockCrashWarning />
200200
</Block.div>
201201
) }
202-
</BlockContext.Provider>
202+
</BlockListBlockContext.Provider>
203203
);
204204
}
205205

0 commit comments

Comments
 (0)