File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -246,22 +246,22 @@ const SEARCH_TREE = [
246246]
247247
248248const DERIVED_BLOCKS = getAllBlocks ( )
249- // An object containing all the blocks and the children blocks they are dependent to
250- const BLOCK_DEPENDENCIES = BLOCK_CATEROGIES . reduce ( ( acc , { id } ) => {
249+ // An object containing all the blocks and their required children
250+ const REQUIRED_BLOCKS = BLOCK_CATEROGIES . reduce ( ( acc , { id } ) => {
251251 DERIVED_BLOCKS [ id ] . forEach ( block => {
252252 acc [ block . name ] = block [ 'stk-required-blocks' ] ?? [ ]
253253 } )
254254 return acc
255255} , { } )
256256
257257const getChildrenBlocks = blockname => {
258- return BLOCK_DEPENDENCIES [ blockname ] || [ ]
258+ return REQUIRED_BLOCKS [ blockname ] || [ ]
259259}
260260
261261const getParentBlocks = blockName => {
262262 const parents = [ ]
263- for ( const parent in BLOCK_DEPENDENCIES ) {
264- if ( BLOCK_DEPENDENCIES [ parent ] . includes ( blockName ) ) {
263+ for ( const parent in REQUIRED_BLOCKS ) {
264+ if ( REQUIRED_BLOCKS [ parent ] . includes ( blockName ) ) {
265265 parents . push ( parent )
266266 }
267267 }
You can’t perform that action at this time.
0 commit comments