Stopped characters with poor names from having failed URL's

This commit is contained in:
Stefan Zermatten
2017-07-13 17:16:23 +02:00
parent a411fb2b43
commit ac23afac5d
5 changed files with 10 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ Router.map(function() {
var _id = this.params._id
var character = Characters.findOne(_id);
var urlName = character && character.urlName;
var path = `\/character\/${_id}\/${urlName}`;
var path = `\/character\/${_id}\/${urlName || "-"}`;
Router.go(path,{},{replaceState:true});
},
});