From c26ad78a2e72389442b561e016ba780805724f52 Mon Sep 17 00:00:00 2001 From: Cecilia Sanare Date: Fri, 16 Feb 2024 07:25:16 -0600 Subject: [PATCH] fix: allow multiple calls to saveRenderHandlers if the value is identical --- lib/core/src/node-view.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/core/src/node-view.ts b/lib/core/src/node-view.ts index f2efcf66a..d96d90d4b 100644 --- a/lib/core/src/node-view.ts +++ b/lib/core/src/node-view.ts @@ -297,7 +297,10 @@ export function saveRenderHandlers( editorContainer: HTMLElement, handlers: RenderHandlers, ) { - if (renderHandlersCache.has(editorContainer)) { + if ( + renderHandlersCache.has(editorContainer) && + renderHandlersCache.get(editorContainer) !== handlers + ) { throw new Error( 'It looks like renderHandlers were already set by someone else.', );