FIX: Naving to root URL was broken

This commit is contained in:
Robin Ward 2017-07-04 12:44:53 -04:00
parent d0d60af510
commit 35ff5d6796
1 changed files with 5 additions and 0 deletions

View File

@ -221,6 +221,11 @@ const DiscourseURL = Ember.Object.extend({
// TODO: Extract into rules we can inject into the URL handler // TODO: Extract into rules we can inject into the URL handler
if (this.navigatedToHome(oldPath, path, opts)) { return; } if (this.navigatedToHome(oldPath, path, opts)) { return; }
// Navigating to empty string is the same as root
if (path === '') {
path = '/';
}
return this.handleURL(path, opts); return this.handleURL(path, opts);
}, },