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

Commit

Permalink
Fix nested routing initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyWebb committed Jan 5, 2016
1 parent 26a1223 commit 920df31
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
7 changes: 6 additions & 1 deletion dist/ko-component-router.js
Expand Up @@ -481,7 +481,12 @@ return /******/ (function(modules) { // webpackBootstrap
value: ko.pureComputed({
read: function read() {
trigger();
return qsParams[guid][prop] || defaultVal;

if (qsParams && qsParams[guid] && qsParams[guid][prop]) {
return qsParams[guid][prop];
}

return defaultVal;
},
write: function write(v) {
utils.merge(qsParams, _defineProperty({}, guid, _defineProperty({}, prop, v)), false);
Expand Down
4 changes: 2 additions & 2 deletions 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.

7 changes: 6 additions & 1 deletion src/query.js
Expand Up @@ -33,7 +33,12 @@ class Query {
value: ko.pureComputed({
read() {
trigger()
return qsParams[guid][prop] || defaultVal

if (qsParams && qsParams[guid] && qsParams[guid][prop]) {
return qsParams[guid][prop]
}

return defaultVal
},
write(v) {
utils.merge(qsParams, {
Expand Down

0 comments on commit 920df31

Please sign in to comment.