FIX: Restore initState() call within discourse-location for subfolder

d7d4612b2d removed the duplicate call to initState(). However, we are relying on a side effect of the duplicate call for subfolder sites to function correctly when accessed without a trailing slash. To avoid a large refactor before the stable release, this commit restores the old behavior.

Long term we should look at migrating to Ember's built-in location library, rather than maintaining our own (very similar) version

https://github.com/emberjs/ember.js/blob/master/packages/%40ember/-internals/routing/lib/location/history_location.ts
This commit is contained in:
David Taylor 2020-02-20 16:41:50 +00:00
parent 7b92280b97
commit 19dcc6bb7b
No known key found for this signature in database
GPG Key ID: 46904C18B1D3F434

View File

@ -18,6 +18,8 @@ const DiscourseLocation = EmberObject.extend({
this._super(...arguments);
this.set("location", this.location || window.location);
this.initState();
},
/**