From 7023dc1f29ff747a9d2fc3bf0cf0ec3fffacd0b1 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sun, 4 Jan 2026 21:47:21 -0800 Subject: Don't open serve --- src/ts/editor-standalone.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/ts') diff --git a/src/ts/editor-standalone.ts b/src/ts/editor-standalone.ts index 2c8ec81..2d4eab8 100644 --- a/src/ts/editor-standalone.ts +++ b/src/ts/editor-standalone.ts @@ -36,7 +36,7 @@ const adelieEditor = { // Listen for theme changes const observer = new MutationObserver((mutations) => { - mutations.forEach((mutation) => { + for (const mutation of mutations) { if (mutation.attributeName === 'data-theme') { const newTheme = document.documentElement.getAttribute('data-theme') === 'dark' @@ -44,7 +44,7 @@ const adelieEditor = { : 'light'; setEditorTheme(view, newTheme); } - }); + } }); observer.observe(document.documentElement, { @@ -66,9 +66,10 @@ const adelieEditor = { setTheme: setEditorTheme, }; -// Export to window +// Export to window and as default if (typeof window !== 'undefined') { - (window as any).adelieEditor = adelieEditor; + (window as unknown as Record).adelieEditor = adelieEditor; } +// Also export for module systems export default adelieEditor; -- cgit v1.2.3-70-g09d2