|
|
@@ -837,8 +837,14 @@ class OnePageViewModel {
|
|
|
huePubSub.subscribe('open.link', href => {
|
|
|
if (href) {
|
|
|
const prefix = window.IS_EMBEDDED ? '' : '/hue';
|
|
|
- if (href.startsWith('/') && !href.startsWith(prefix)) {
|
|
|
- page(window.HUE_BASE_URL + prefix + href);
|
|
|
+ if (href.startsWith('/')) {
|
|
|
+ if (window.HUE_BASE_URL.length && href.startsWith(window.HUE_BASE_URL)) {
|
|
|
+ page(href);
|
|
|
+ } else if (href.startsWith(prefix)) {
|
|
|
+ page(window.HUE_BASE_URL + href);
|
|
|
+ } else {
|
|
|
+ page(window.HUE_BASE_URL + prefix + href);
|
|
|
+ }
|
|
|
} else if (href.indexOf('#') == 0) {
|
|
|
// Only place that seem to use this is hbase onclick row
|
|
|
window.location.hash = href;
|