From f8361174f2417a0a31f23dc060c27da69d0ca9ac Mon Sep 17 00:00:00 2001 From: Amit Haridas Date: Fri, 22 May 2026 21:42:34 +0530 Subject: [PATCH] chore: add it to eslint globals, add debug logging to createEditor Amit Haridas --- eslint.config.js | 1 + src/editor/codemirror-setup.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/eslint.config.js b/eslint.config.js index c0e1ef0..5c51f90 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -75,6 +75,7 @@ module.exports = [ jest: 'readonly', describe: 'readonly', test: 'readonly', + it: 'readonly', expect: 'readonly', beforeEach: 'readonly', afterEach: 'readonly', diff --git a/src/editor/codemirror-setup.js b/src/editor/codemirror-setup.js index ff5214b..a16f5e7 100644 --- a/src/editor/codemirror-setup.js +++ b/src/editor/codemirror-setup.js @@ -59,6 +59,11 @@ const jetBrainsMonoTheme = EditorView.theme({ * @returns {EditorView} the created editor view */ function createEditor(parentElement, options = {}) { + console.log('[createEditor] Called with parentElement:', parentElement?.id, 'dimensions:', parentElement?.clientWidth, 'x', parentElement?.clientHeight); + if (!parentElement) { + console.error('[createEditor] ERROR: parentElement is null or undefined!'); + return null; + } const { content = '', onChange = () => {},