@secretstache/wordpress-gutenberg 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secretstache/wordpress-gutenberg",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "",
5
5
  "author": "Secret Stache",
6
6
  "license": "GPL-2.0-or-later",
@@ -8,9 +8,10 @@ export const hideRootBlockForOtherBlocks = (rootBlockName) => {
8
8
  'ssm/with-root-block',
9
9
  (blockSettings, blockName) => {
10
10
  const isRootBlock = blockName === rootBlockName;
11
- const hasOwnAllowedBlocks = blockSettings?.allowedBlocks;
11
+ const hasOwnAllowedBlocks = !!blockSettings?.allowedBlocks;
12
+ const hasParent = !!blockSettings?.parent;
12
13
 
13
- if (isRootBlock || hasOwnAllowedBlocks) {
14
+ if (isRootBlock || hasParent || hasOwnAllowedBlocks) {
14
15
  return blockSettings;
15
16
  }
16
17