fix(react): window bug
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# @xyflow/react
|
||||
|
||||
## 12.0.0-next.24
|
||||
|
||||
- fix `window` bug for SSR for real
|
||||
|
||||
## 12.0.0-next.23
|
||||
|
||||
- fix `window` bug for SSR
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@xyflow/react",
|
||||
"version": "12.0.0-next.23",
|
||||
"version": "12.0.0-next.24",
|
||||
"description": "React Flow - A highly customizable React library for building node-based editors and interactive flow charts.",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
||||
@@ -28,7 +28,7 @@ export type FlowRendererProps<NodeType extends Node = Node> = Omit<
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
const win = typeof window === 'undefined' ? window : undefined;
|
||||
const win = typeof window !== 'undefined' ? window : undefined;
|
||||
|
||||
const selector = (s: ReactFlowState) => {
|
||||
return { nodesSelectionActive: s.nodesSelectionActive, userSelectionActive: s.userSelectionActive };
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user