fix(react): window bug

This commit is contained in:
moklick
2024-06-20 15:53:35 +02:00
parent 7338eab8c9
commit 71db83761c
4 changed files with 7 additions and 3 deletions
@@ -9,7 +9,7 @@ import { Edge, Node } from '../types';
const selected = (item: Node | Edge) => item.selected;
const deleteKeyOptions: UseKeyPressOptions = { actInsideInputWithModifier: false };
const win = typeof window === 'undefined' ? window : undefined;
const win = typeof window !== 'undefined' ? window : undefined;
/**
* Hook for handling global key events.