[frontend] Prevent JS error on empty URLs for open.link
@@ -1036,11 +1036,16 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
});
huePubSub.subscribe('open.link', function (href) {
+ if (href) {
if (href.startsWith('/') && !href.startsWith('/hue')){
page('/hue' + href);
} else {
page(href);
}
+ }
+ else {
+ console.warn('Received an open.link without href.')
+ }
});
};
