From ef4e31355d1faef0e829eea3a91c5f11c274509a Mon Sep 17 00:00:00 2001 From: Kris Zyp Date: Sat, 14 Sep 2024 16:32:13 -0600 Subject: [PATCH] Don't update onFileChange when there is no selectedFile --- .../instance/functions/manage/applicationsEditor/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/instance/functions/manage/applicationsEditor/index.js b/src/components/instance/functions/manage/applicationsEditor/index.js index 0a1daa916..72abb4219 100644 --- a/src/components/instance/functions/manage/applicationsEditor/index.js +++ b/src/components/instance/functions/manage/applicationsEditor/index.js @@ -308,6 +308,7 @@ function WebIDE({ active={activeEditorWindow === EDITOR_WINDOWS.CODE_EDITOR_WINDOW} file={selectedFile} onFileChange={async (fileContent) => { + if (!selectedFile) return; updateFileInMemory(fileContent); await onFileChange({ path: selectedFile?.path, content: fileContent }); setSelectedFile({ ...selectedFile, content: fileContent, cached: true });