dev-utils: fix busy refresh loop

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-08-19 00:25:44 +02:00
parent 557faeb7e1
commit be2cd47406
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;
}