FIX: make route to tag more robust
There are some edge cases where code would fail here, so adding protection
This commit is contained in:
parent
1f636c445b
commit
56b6a4779d
|
@ -153,7 +153,12 @@ const DiscourseURL = Ember.Object.extend({
|
|||
},
|
||||
|
||||
routeToTag(a) {
|
||||
if (a && a.host !== document.location.host) {
|
||||
// skip when we are provided nowhere to route to
|
||||
if (!a || !a.href) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (a.host !== document.location.host) {
|
||||
document.location = a.href;
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue