Skip to content

Commit

Permalink
Fix issue with not propagating tail after updating data
Browse files Browse the repository at this point in the history
  • Loading branch information
TimvdLippe committed Apr 29, 2016
1 parent 5af900e commit cbdc667
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions carbon-route.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@
this.tail = {path: null, prefix: null, queryParams: null};
this.set('route.path', this.__getLink({}));
this._skipMatch = false;
this.__tryToMatch(this.route.path, this.pattern);
},

__getLink: function(overrideValues) {
Expand Down
6 changes: 6 additions & 0 deletions test/carbon-route.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@
expect(routes.foo.route.path).to.be.eql('/foo/123/page1');
});

test('correctly sets tail', function() {
var routes = fixtureChainedRoutes({ path: '/foo/' });
routes.foo.set('data.foo', '123');
expect(routes.page.route.path).to.be.eql('/');
});

test('with only match and trailing slash', function() {
var routes = fixtureChainedRoutes({ path: '/foo/123/' });

Expand Down

0 comments on commit cbdc667

Please sign in to comment.