Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

Commit

Permalink
Pass params by value
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyWebb committed Jan 8, 2016
1 parent c3dc8e3 commit af80981
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/ko-component-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ return /******/ (function(modules) { // webpackBootstrap
createViewModel: function createViewModel(routerParams, componentInfo) {
var el = componentInfo.element;
var bindingCtx = ko.contextFor(el);
return new Router(el, bindingCtx, routerParams);
return new Router(el, bindingCtx, ko.toJS(routerParams));
}
};

Expand Down
2 changes: 1 addition & 1 deletion dist/ko-component-router.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/dist/bundle.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
"stage-dist"
],
"keywords": [
"ko",
"knockoutjs",
"knockout",
"ko",
"component",
"router",
"routing",
Expand Down
2 changes: 1 addition & 1 deletion src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ module.exports = {
createViewModel(routerParams, componentInfo) {
const el = componentInfo.element
const bindingCtx = ko.contextFor(el)
return new Router(el, bindingCtx, routerParams)
return new Router(el, bindingCtx, ko.toJS(routerParams))
}
}

Expand Down

0 comments on commit af80981

Please sign in to comment.