Selaa lähdekoodia

avoid exception if path is null

Angus McLeod 6 vuotta sitten
vanhempi
commit
3cdaa82ac5

+ 1 - 1
assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6

@@ -25,7 +25,7 @@ export default {
 
     const existing = DiscourseURL.routeTo;
     DiscourseURL.routeTo = function(path, opts) {
-      if (path.indexOf('/w/') > -1) {
+      if (path && path.indexOf('/w/') > -1) {
         return window.location = path;
       }
       return existing.apply(this, [path, opts]);