Skip to content

Commit e71e664

Browse files
authored
Merge pull request #362 from kellyselden/formatURL
use base formatURL for same effect (rootURL handling)
2 parents b9fb4fd + 1e80653 commit e71e664

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

app/locations/none.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,14 @@ export default Ember.NoneLocation.extend({
2727
_response: readOnly('fastboot.response'),
2828
_request: readOnly('fastboot.request'),
2929

30-
_normalizePath(path) {
31-
// only on redirects (transitionTo, replaceWith, etc...)
32-
// incoming path does not include rootURL
33-
let rootURL = get(this, 'rootURL');
34-
rootURL = rootURL.substr(0, rootURL.length - 1);
35-
return `${rootURL}${path}`;
36-
},
37-
3830
setURL(path) {
3931
if (get(this, 'fastboot.isFastBoot')) {
4032
let response = get(this, '_response');
4133
let currentPath = get(this, 'path');
4234
let isInitialPath = !currentPath || currentPath.length === 0;
4335

4436
if (!isInitialPath) {
45-
path = this._normalizePath(path);
37+
path = this.formatURL(path);
4638
let isTransitioning = currentPath !== path;
4739

4840
if (isTransitioning) {

0 commit comments

Comments
 (0)