Skip to content

Commit

Permalink
fix markdown file type (#6312)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael18811380328 authored Jul 8, 2024
1 parent 6f0bd69 commit 739a12a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions frontend/src/components/cur-dir-path/dir-tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,14 @@ 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;
const { TAGS, TRASH, HISTORY } = TextTranslation;
if (userPerm !== 'rw') {
return list;
}
if (this.isMarkdownFile(currentPath)) {
if (Utils.isMarkdownFile(currentPath)) {
return list;
}

Expand Down

0 comments on commit 739a12a

Please sign in to comment.