Bug when block is included in pattern
-
Hello! I was very happy to find this plugin using splide.js for carousels — it’s excellent. I created a couple of patterns which include the block, and when WP tries to generate a preview in the pattern inserter, it shows as broken (but pulling it into the editor, it works fine). The bug appears to be in the carousel block js. ChatGPT helped me patch it and reports “The fix is basically: guard
getBlocksByClientId(clientId)[0]before reading.innerBlocks.”const block = getBlocksByClientId(clientId)[0];
const innerBlocks = block?.innerBlocks || [];This patch did seem to work, so hoping you can incorporate it.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.