Skip to content

Commit eb2d93d

Browse files
committed
nav.js: more debug
1 parent 70b2756 commit eb2d93d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

assets/nav.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@
127127
allBlocks.forEach((el, i) => {
128128
console.log('block', i, 'tag:', el.tagName, 'class:', el.className, 'display:', getComputedStyle(el).display, 'content len:', el.textContent.trim().length);
129129
});
130-
if (document.querySelector('.cm-editor-wrap')) return; // already rendered
130+
console.log('CM wrappers already:', document.querySelectorAll('.cm-editor-wrap').length);
131+
console.log('CM instances already:', document.querySelectorAll('.CodeMirror').length);
132+
if (document.querySelector('.cm-editor-wrap')) { console.log('GUARD: already rendered'); return; }
131133
document.querySelectorAll('.syntax-block, .impl-block').forEach(el => {
132134
el.style.cssText = 'display:none!important;visibility:hidden!important;height:0!important;overflow:hidden!important;';
133135
if (!el.parentNode) return;

0 commit comments

Comments
 (0)