From 73700559968504b991eab5aeb9636361823a07fd Mon Sep 17 00:00:00 2001 From: silver Date: Thu, 15 Jan 2026 12:56:35 +0100 Subject: [PATCH 1/2] fix: preserve OCA.Text properties in public share script Prevent race condition where text-public.js would overwrite createEditor/createTable methods if text-editors.js loaded first. Uses spread operator to merge instead of replace, matching the pattern already used in editor.js. Signed-off-by: silver --- src/public.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/public.js b/src/public.js index 35d1a66320d..a2edaa11133 100644 --- a/src/public.js +++ b/src/public.js @@ -160,5 +160,6 @@ documentReady(() => { }) OCA.Text = { + ...OCA.Text, RichWorkspaceEnabled: loadState('text', 'workspace_available'), } From be1b2ded6f782197285e64c752206ad2be547a12 Mon Sep 17 00:00:00 2001 From: Sylwia <83009937+silverkszlo@users.noreply.github.com> Date: Thu, 15 Jan 2026 15:04:27 +0100 Subject: [PATCH 2/2] fix: use optional chaining for OCA.Text in public script Co-authored-by: Julius Knorr Signed-off-by: Sylwia <83009937+silverkszlo@users.noreply.github.com> [skip ci] --- src/public.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/public.js b/src/public.js index a2edaa11133..247b5df46c4 100644 --- a/src/public.js +++ b/src/public.js @@ -160,6 +160,6 @@ documentReady(() => { }) OCA.Text = { - ...OCA.Text, + ...(window?.OCA?.Text ?? {}), RichWorkspaceEnabled: loadState('text', 'workspace_available'), }