A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix: questionLanding function params is null render error
shuaidb53a5b5a2a9
diff --git a/ui/src/components/Editor/utils/index.ts b/ui/src/components/Editor/utils/index.tsindex ef36fa91..8bf393fb 100644--- a/ui/src/components/Editor/utils/index.ts+++ b/ui/src/components/Editor/utils/index.ts@@ -144,7 +144,6 @@ export function htmlRender(el: HTMLElement | null) {// add rel nofollow for link not inlcludes domainel.querySelectorAll('a').forEach((a) => {- if (a?.href?.includes('http')) return;const base = window.location.origin;const targetUrl = new URL(a.href, base);if (targetUrl.toString() !== window.location.href) {diff --git a/ui/src/router/pathFactory.ts b/ui/src/router/pathFactory.tsindex fbf4e0ca..e26636aa 100644--- a/ui/src/router/pathFactory.ts+++ b/ui/src/router/pathFactory.ts@@ -19,6 +19,9 @@ const tagEdit = (tagId: string) => {};const questionLanding = (questionId: string, slugTitle: string = '') => {const { seo } = seoSettingStore.getState();+ if (!questionId) {+ return slugTitle ? `/questions/null/slugTitle` : '/questions/null';+ }// @ts-ignoreif (/[13]/.test(seo.permalink) && slugTitle) {return urlcat('/questions/:questionId/:slugPermalink', {