diff --git a/src/renderer/hooks/useResizablePanel.ts b/src/renderer/hooks/useResizablePanel.ts index 9400ba9c..29f518af 100644 --- a/src/renderer/hooks/useResizablePanel.ts +++ b/src/renderer/hooks/useResizablePanel.ts @@ -50,16 +50,16 @@ export function useResizablePanel({ // Keep callbacks in refs to avoid stale closures in mousemove listener const onWidthChangeRef = useRef(onWidthChange); - onWidthChangeRef.current = onWidthChange; - const minWidthRef = useRef(minWidth); - minWidthRef.current = minWidth; - const maxWidthRef = useRef(maxWidth); - maxWidthRef.current = maxWidth; - const sideRef = useRef(side); - sideRef.current = side; + + useEffect(() => { + onWidthChangeRef.current = onWidthChange; + minWidthRef.current = minWidth; + maxWidthRef.current = maxWidth; + sideRef.current = side; + }); const handleMouseMove = useCallback( (e: MouseEvent) => { diff --git a/src/renderer/utils/markdownPlugins.ts b/src/renderer/utils/markdownPlugins.ts index a4089d76..1652702b 100644 --- a/src/renderer/utils/markdownPlugins.ts +++ b/src/renderer/utils/markdownPlugins.ts @@ -37,7 +37,7 @@ const sanitizeSchema: SanitizeSchema = { attributes: { ...defaultSchema.attributes, // Allow title on abbr (for tooltip definitions) - abbr: [...(defaultSchema.attributes?.['abbr'] ?? []), 'title'], + abbr: [...(defaultSchema.attributes?.abbr ?? []), 'title'], }, };