Skip to content

Commit 8c87778

Browse files
authored
fix: playground home redirect (#6)
1 parent 4b4e211 commit 8c87778

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/playground/webapp/controller/Main.controller.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,15 @@ sap.ui.define([
7878
},
7979

8080
onUI5LogoPressed: function () {
81-
window.location.href = '/index.html';
81+
window.location.href = this._getHomeURL();
82+
},
83+
84+
_getHomeURL() {
85+
if (location.hostname === "localhost" || location.hostname === "127.0.0.1") {
86+
return "/index.html";
87+
}
88+
89+
return "/ui5-webcomponents/index.html";
8290
},
8391

8492
// Workaround for selecting menu item upon page reload.

0 commit comments

Comments
 (0)