mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-16 04:04:06 +02:00
Call unref on pathRefs created for move_node (#5727)
* Call unref on pathRefs created for move_node * Create old-frogs-run.md --------- Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
This commit is contained in:
5
.changeset/old-frogs-run.md
Normal file
5
.changeset/old-frogs-run.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'slate-react': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Call unref on pathRefs created for move_node to remove memory leak
|
@@ -216,6 +216,8 @@ export const withReact = <T extends BaseEditor>(
|
|||||||
const [node] = Editor.node(e, pathRef.current)
|
const [node] = Editor.node(e, pathRef.current)
|
||||||
NODE_TO_KEY.set(node, key)
|
NODE_TO_KEY.set(node, key)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pathRef.unref()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user