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

Commit

Permalink
Bindings should not explicitly preserve state and/or query
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyWebb committed Jan 5, 2016
1 parent 718d5d1 commit 0b55b89
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/ko-component-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -1774,8 +1774,8 @@ return /******/ (function(modules) { // webpackBootstrap
bindingsToApply.click = function (data, e) {
var router = getRouter(ctx);
var url = bindings.has('path') ? bindings.get('path') : router.canonicalPath();
var state = bindings.has('state') ? bindings.get('state') : router.state();
var query = bindings.has('query') ? bindings.get('query') : router.query.getAll();
var state = bindings.has('state') ? bindings.get('state') : null;
var query = bindings.has('query') ? bindings.get('query') : false;
router.update(url, state, true, query);

e.preventDefault();
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 src/binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function applyBinding(el, bindings, ctx) {
bindingsToApply.click = (data, e) => {
const router = getRouter(ctx)
const url = bindings.has('path') ? bindings.get('path') : router.canonicalPath()
const state = bindings.has('state') ? bindings.get('state') : router.state()
const query = bindings.has('query') ? bindings.get('query') : router.query.getAll()
const state = bindings.has('state') ? bindings.get('state') : null
const query = bindings.has('query') ? bindings.get('query') : false
router.update(url, state, true, query)

e.preventDefault()
Expand Down

0 comments on commit 0b55b89

Please sign in to comment.