Fixed issue where filtering allowed element types with a NotificationHandler causes issues with Block Grid areas

This commit is contained in:
Lennard Fonteijn
2023-03-14 12:23:44 +01:00
committed by Michael Latouche
parent f6ebcdcfb6
commit e10ff16fa1

View File

@@ -708,7 +708,7 @@
} else
if(allowance.elementTypeKey) {
const blockType = vm.availableBlockTypes.find(x => x.blockConfigModel.contentElementTypeKey === allowance.elementTypeKey);
if(allowedElementTypes.indexOf(blockType) === -1) {
if(blockType && allowedElementTypes.indexOf(blockType) === -1) {
allowedElementTypes.push(blockType);
}
}