From f078929b259e6396148f3f4d1d2e62655cc388e6 Mon Sep 17 00:00:00 2001 From: Domagoj Kriskovic Date: Mon, 16 Mar 2026 12:21:28 +0100 Subject: [PATCH] Fix optional chaining for file extension retrieval in EditorSwitch GitOrigin-RevId: 9aeee2f856c4f4dadc38affecc06179b61267af0 --- .../js/features/source-editor/components/editor-switch.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/frontend/js/features/source-editor/components/editor-switch.tsx b/services/web/frontend/js/features/source-editor/components/editor-switch.tsx index c83eeef357..092e4563a9 100644 --- a/services/web/frontend/js/features/source-editor/components/editor-switch.tsx +++ b/services/web/frontend/js/features/source-editor/components/editor-switch.tsx @@ -17,7 +17,7 @@ function EditorSwitch() { const richTextAvailable = openDocName ? isVisualEditorAvailable(openDocName) : false - const extension = getFileExtension(openDocName || '') + const extension = getFileExtension(openDocName || '') ?? '' const handleChange = useCallback( (event: ChangeEvent) => {