diff --git a/web/app/components/workflow/skill/skill-doc-editor.tsx b/web/app/components/workflow/skill/skill-doc-editor.tsx index 553f8455e7..34ff5237f8 100644 --- a/web/app/components/workflow/skill/skill-doc-editor.tsx +++ b/web/app/components/workflow/skill/skill-doc-editor.tsx @@ -48,7 +48,7 @@ const SkillDocEditor: FC = () => { const isImage = isImageFile(fileExtension) const isVideo = isVideoFile(fileExtension) const isOffice = isOfficeFile(fileExtension) - const isEditable = isMarkdown || isCodeOrText + const isEditable = useMemo(() => isMarkdown || isCodeOrText, [isMarkdown, isCodeOrText]) const { data: fileContent, @@ -78,7 +78,7 @@ const SkillDocEditor: FC = () => { return if (dirtyMetadataIds.has(activeTabId)) return - let nextMetadata: Record = {} + let nextMetadata: Record = {} if (fileContent.metadata) { if (typeof fileContent.metadata === 'string') { try {