Skip to content
Snippets Groups Projects
Commit 5fc5578d authored by snater's avatar snater
Browse files

Issue #3314446: Do not initialise Inserter when there are no child nodes

parent 22a2e511
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,10 @@ ...@@ -28,7 +28,10 @@
// Initialize Inserter managing content insertion // Initialize Inserter managing content insertion
context.querySelectorAll('.insert').forEach(element => { context.querySelectorAll('.insert').forEach(element => {
if (registry.find(inserter => inserter.container === element)) { if (
!element.hasChildNodes()
|| registry.find(inserter => inserter.container === element)
) {
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment