Explorar o código

avoid exception if path is null

Angus McLeod %!s(int64=6) %!d(string=hai) anos
pai
achega
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]);