fix GrapesJS editable components check for theme blocks

Add null check for window.themeBlocks[blockSlug] before accessing label to prevent errors when block slug exists but has no theme block definition.

Update PageBuilderBody dist files with the fix.
This commit is contained in:
2026-11-23 17:36:49 +01:00
parent d0307d64e9
commit 920ab7df4d
3 changed files with 3 additions and 3 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -228,7 +228,7 @@
}
let blockSlug = component.attributes['block-slug'];
if (blockSlug) {
if (blockSlug && window.themeBlocks && window.themeBlocks[blockSlug]) {
let labelHtml = window.themeBlocks[blockSlug]['label'];
let labelTextParts = labelHtml.split("</div>");
if (labelTextParts.length > 1) {