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

Commit af80981

Browse files
committed
Pass params by value
1 parent c3dc8e3 commit af80981

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

dist/ko-component-router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ return /******/ (function(modules) { // webpackBootstrap
226226
createViewModel: function createViewModel(routerParams, componentInfo) {
227227
var el = componentInfo.element;
228228
var bindingCtx = ko.contextFor(el);
229-
return new Router(el, bindingCtx, routerParams);
229+
return new Router(el, bindingCtx, ko.toJS(routerParams));
230230
}
231231
};
232232

dist/ko-component-router.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/dist/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/dist/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
"stage-dist"
2727
],
2828
"keywords": [
29-
"ko",
29+
"knockoutjs",
3030
"knockout",
31+
"ko",
3132
"component",
3233
"router",
3334
"routing",

src/router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ module.exports = {
132132
createViewModel(routerParams, componentInfo) {
133133
const el = componentInfo.element
134134
const bindingCtx = ko.contextFor(el)
135-
return new Router(el, bindingCtx, routerParams)
135+
return new Router(el, bindingCtx, ko.toJS(routerParams))
136136
}
137137
}
138138

0 commit comments

Comments
 (0)