diff --git a/frontend/src/pages/wiki2/side-panel.js b/frontend/src/pages/wiki2/side-panel.js index 5a98bedf6f..e730608678 100644 --- a/frontend/src/pages/wiki2/side-panel.js +++ b/frontend/src/pages/wiki2/side-panel.js @@ -45,13 +45,14 @@ class SidePanel extends PureComponent { const config = deepCopy(this.props.config); const { pages } = config; const index = PageUtils.getPageIndexById(pageId, pages); + const deletePageName = pages[index].name; config.pages.splice(index, 1); wikiAPI.deleteWiki2Page(wikiId, pageId).then((res) => { if (res.data.success === true) { this.props.updateWikiConfig(config); toaster.success( - {gettext('xxx page deleted').replace('xxx', pages[index].name)} + {gettext('xxx page deleted').replace('xxx', deletePageName)} this.revertWikiPage(pageId)} /> );