diff --git a/src/forge/Wiki/Index.jsx b/src/forge/Wiki/Index.jsx index 2ab1acf0e..43a34bc3d 100644 --- a/src/forge/Wiki/Index.jsx +++ b/src/forge/Wiki/Index.jsx @@ -15,12 +15,12 @@ const InputGroup = Input.Group; const { Option } = Select; export default (props) => { - const { match, history, showNotification, project, projectDetail } = props; + const { match, history, showNotification, project, projectDetail, history:{location:{pathname}} } = props; const permission = projectDetail && projectDetail.permission && projectDetail.permission !== "Reporter"; let projectsId = match.params.projectsId; let owner = match.params.owner; - let wikiName = match.params.wikiName; + let wikiName = pathname && pathname.split('/').pop(); const [fileArrInit, setFileArrInit] = useState(null); const [checkItem, setCheckItem] = useState({}); const [itemDetail, setItemDetail] = useState({});