Minor changes to make code editor safer

This commit is contained in:
Nilay Majorwar
2021-12-17 15:37:35 +05:30
parent febe31a3d8
commit 50e15aaf57
2 changed files with 24 additions and 19 deletions

View File

@@ -103,7 +103,7 @@ export const useEditorBreakpoints = ({
// Mouse leaves editor -> remove hover breakpoint hint
React.useEffect(() => {
if (!editor) return;
const disposer = editor.onMouseLeave((e: MonacoMouseLeaveEvent) => {
const disposer = editor.onMouseLeave((_: MonacoMouseLeaveEvent) => {
if (!hoverBreakpoint.current) return;
editor.deltaDecorations(hoverBreakpoint.current.decorRanges, []);
hoverBreakpoint.current = null;