Skip to content

Commit

Permalink
fix: playground home redirect (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilhan007 authored Feb 11, 2019
1 parent 4b4e211 commit 8c87778
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/playground/webapp/controller/Main.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,15 @@ sap.ui.define([
},

onUI5LogoPressed: function () {
window.location.href = '/index.html';
window.location.href = this._getHomeURL();
},

_getHomeURL() {
if (location.hostname === "localhost" || location.hostname === "127.0.0.1") {
return "/index.html";
}

return "/ui5-webcomponents/index.html";
},

// Workaround for selecting menu item upon page reload.
Expand Down

0 comments on commit 8c87778

Please sign in to comment.