1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-13 13:50:07 +00:00

repair new draft bug (#2814)

This commit is contained in:
杨顺强
2019-01-11 11:31:28 +08:00
committed by Daniel Pan
parent 1e4ba68f7d
commit 8108810520

View File

@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { isPro, enableFileComment, fileAuditEnabled, folderPermEnabled} from '../../utils/constants';
import DirentMenuItem from './dirent-menu-item';
import { Utils } from '../../utils/utils';
const propTypes = {
dirent: PropTypes.object.isRequired,
@@ -65,7 +66,9 @@ class DirentMenu extends React.Component {
menuList.push('Lock');
}
}
menuList.push('New Draft');
if (Utils.isMarkdownFile(dirent.name)) {
menuList.push('New Draft');
}
menuList.push('Divider');
if (enableFileComment) {
menuList.push('Comment');