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

Commit

Permalink
child router state getting cleared inappropriately
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyWebb committed Jun 13, 2016
1 parent f2d3c7e commit a9f05e1
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dist/ko-component-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ return /******/ (function(modules) { // webpackBootstrap
};

if (state === false && samePage) {
(0, _utils.extend)(toCtx, { state: fromCtx.state }, false);
toCtx.state = fromCtx.state;
} else if (!_this.config.persistState && state) {
toCtx.state = state;
}
Expand All @@ -433,7 +433,7 @@ return /******/ (function(modules) { // webpackBootstrap
complete.call(_this, true);
}
} else if (_this.$child) {
_this.$child.update(childPath || '/', {}, false, {});
_this.$child.update(childPath || '/', false, false, false);
complete.call(_this);
} else {
complete.call(_this);
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.

4 changes: 2 additions & 2 deletions lib/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ var Context = function () {
};

if (state === false && samePage) {
(0, _utils.extend)(toCtx, { state: fromCtx.state }, false);
toCtx.state = fromCtx.state;
} else if (!_this.config.persistState && state) {
toCtx.state = state;
}
Expand All @@ -157,7 +157,7 @@ var Context = function () {
complete.call(_this, true);
}
} else if (_this.$child) {
_this.$child.update(childPath || '/', {}, false, {});
_this.$child.update(childPath || '/', false, false, false);
complete.call(_this);
} else {
complete.call(_this);
Expand Down
4 changes: 2 additions & 2 deletions src/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default class Context {
}

if (state === false && samePage) {
extend(toCtx, { state: fromCtx.state }, false)
toCtx.state = fromCtx.state
} else if (!this.config.persistState && state) {
toCtx.state = state
}
Expand All @@ -119,7 +119,7 @@ export default class Context {
complete.call(this, true)
}
} else if (this.$child) {
this.$child.update(childPath || '/', {}, false, {})
this.$child.update(childPath || '/', false, false, false)
complete.call(this)
} else {
complete.call(this)
Expand Down

0 comments on commit a9f05e1

Please sign in to comment.