Skip to content

Commit 265d88b

Browse files
committed
Pass path, navigation to onNavigation() to match onBeforeNavigation().
1 parent d8a45d8 commit 265d88b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/RouterMixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ var RouterMixin = {
189189

190190
this.delegateSetRoutingState(state, function() {
191191
if (this.props.onNavigation) {
192-
this.props.onNavigation();
192+
this.props.onNavigation(path, navigation);
193193
}
194194
cb();
195195
}.bind(this));

tests/browser/browser.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,14 @@ describe('Routing', function() {
232232
beforeNavigationHandler: function (nextPath) {
233233
called.push(nextPath);
234234
},
235-
navigationHandler: function () {
236-
called.push('onNavigation');
235+
navigationHandler: function (path) {
236+
called.push(path);
237237
}
238238
});
239239
router.navigate('/__zuul/hello', function () {
240240
assert.equal(called.length, 2);
241241
assert.equal(called[0], '/__zuul/hello');
242-
assert.equal(called[1], 'onNavigation');
242+
assert.equal(called[1], '/__zuul/hello');
243243
done();
244244
});
245245
});

0 commit comments

Comments
 (0)