Merge pull request #6883 from backstage/rugvip/busy

dev-utils: fix busy refresh loop
This commit is contained in:
Patrik Oldsberg
2021-08-19 01:29:20 +02:00
committed by GitHub
2 changed files with 10 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/dev-utils': patch
---
Fixed busy refresh loop that happened when registering a page at `/`.
+5 -1
View File
@@ -227,7 +227,11 @@ class DevAppBuilder {
const DevApp = hot(hotModule)(this.build());
if (window.location.pathname === '/' && this.defaultPage) {
if (
window.location.pathname === '/' &&
this.defaultPage &&
this.defaultPage !== '/'
) {
window.location.pathname = this.defaultPage;
}