From 1764fbdb883304636823e0b1e0328cc3a1a8a656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= <792998983@qq.com> Date: Fri, 3 Sep 2021 21:51:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9F=E5=BA=A6=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/Detail.js | 2 +- src/forge/Main/DetailAdaptor.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/forge/Main/DetailAdaptor.js diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 3303d42c..803b4c74 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -142,7 +142,7 @@ const WikiEdit = Loadable({ function checkPathname(projectsId, owner, pathname) { let name = ""; if (pathname && pathname !== `/${owner}/${projectsId}`) { - let url = pathname.split(`/${owner}/${projectsId}`)[1]; + let url = pathname.split(`/${owner}/${projectsId}`)[1] || ''; if (url.indexOf("/about") > -1) { name = "about" } else if (url.indexOf("/issues") > -1 || url.indexOf("Milepost") > 0) { diff --git a/src/forge/Main/DetailAdaptor.js b/src/forge/Main/DetailAdaptor.js new file mode 100644 index 00000000..4f2fba26 --- /dev/null +++ b/src/forge/Main/DetailAdaptor.js @@ -0,0 +1,6 @@ +import Detail from "./Detail"; +import { SnackbarHOC } from "educoder"; +import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC"; +import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC"; + +export default CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Detail))); \ No newline at end of file