From 739a12ada46b0726d619262e6817d38f251a8325 Mon Sep 17 00:00:00 2001 From: Michael An <2331806369@qq.com> Date: Mon, 8 Jul 2024 17:19:40 +0800 Subject: [PATCH] fix markdown file type (#6312) --- frontend/src/components/cur-dir-path/dir-tool.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frontend/src/components/cur-dir-path/dir-tool.js b/frontend/src/components/cur-dir-path/dir-tool.js index c4fc928554d..8ad67eae2a0 100644 --- a/frontend/src/components/cur-dir-path/dir-tool.js +++ b/frontend/src/components/cur-dir-path/dir-tool.js @@ -50,10 +50,6 @@ class DirTool extends React.Component { this.setState({isRepoTagDialogOpen: false}); }; - isMarkdownFile(filePath) { - return Utils.getFileName(filePath).includes('.md'); - } - getMenu = () => { const list = []; const { repoID, userPerm, currentPath } = this.props; @@ -61,7 +57,7 @@ class DirTool extends React.Component { if (userPerm !== 'rw') { return list; } - if (this.isMarkdownFile(currentPath)) { + if (Utils.isMarkdownFile(currentPath)) { return list; }