Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix the judgment logic of isHomePage in QIANKUN #11265

Closed
wants to merge 3 commits into from
Closed

fix: Fix the judgment logic of isHomePage in QIANKUN #11265

wants to merge 3 commits into from

Conversation

fengsx
Copy link
Contributor

@fengsx fengsx commented Jun 12, 2023

isHomePage 的判断逻辑漏掉了以微前端方式部署 doc 时情况。

@vercel
Copy link

vercel bot commented Jun 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
umi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 17, 2023 8:14am

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.13% 🎉

Comparison is base (daec0c4) 29.01% compared to head (4c84767) 29.15%.

❗ Current head 4c84767 differs from pull request most recent head 9e1021f. Consider uploading reports for the commit 9e1021f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11265      +/-   ##
==========================================
+ Coverage   29.01%   29.15%   +0.13%     
==========================================
  Files         484      483       -1     
  Lines       14708    14607     -101     
  Branches     3474     3447      -27     
==========================================
- Hits         4268     4258      -10     
+ Misses       9683     9601      -82     
+ Partials      757      748       -9     

see 21 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -31,10 +33,12 @@ export default (props: any) => {
}, []);

const { title, description } = props.themeConfig;

const location = useLocation?.();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方为啥要 ?. 调用,会不存在吗

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

会的。没有加的话测试用例报错。如果使用了 mpa 模式也会出问题。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

后面 umi 文档应该要迁移到 dumi ,这个地方感觉不太优雅。

Copy link
Contributor Author

@fengsx fengsx Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前用 try-catch 搞了一个版本,感觉太丑了,就换成可选链了。

要不先合了?如果微前端部署的话,home page 判断错误,永远跳不了主页了。

@fengsx fengsx closed this by deleting the head repository Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants