Skip to content

Commit

Permalink
Fix negation operator
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmhunt committed Dec 20, 2016
1 parent e5e1c42 commit 90a7cdc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ For TODO between alpha and release, see https://github.com/knockout/tko/issues/1

## 🏹 Alpha-1 ( Work in progress on the `master` branch )

* Fix negation operator (-) application - integers `-1` work, as well as variables `-x` and expressions `-(x + y)`
* Use tko.binding.foreach for the `foreach` binding (based on brianmhunt/knockout-fast-foreach)
* Add `each` as an alias of `foreach`

Expand Down
4 changes: 2 additions & 2 deletions dist/ko.js
Original file line number Diff line number Diff line change
Expand Up @@ -3162,7 +3162,7 @@ var operators$1 = {
'%': function mod(a, b) { return a % b; },
// sub/add
'+': function add(a, b) { return a + b; },
'-': function sub(a, b) { return a - b; },
'-': function sub(a, b) { return (a || 0) - (b || 0); },
// relational
'<': function lt(a, b) { return a < b; },
'<=': function le(a, b) { return a <= b; },
Expand Down Expand Up @@ -4074,7 +4074,7 @@ Parser.prototype.expression = function (filterable) {
break;
}

// infix operators
// infix or postfix operators
op = this.operator(true);

if (op === operators['?']) {
Expand Down
4 changes: 2 additions & 2 deletions dist/tko.js
Original file line number Diff line number Diff line change
Expand Up @@ -3162,7 +3162,7 @@ var operators$1 = {
'%': function mod(a, b) { return a % b; },
// sub/add
'+': function add(a, b) { return a + b; },
'-': function sub(a, b) { return a - b; },
'-': function sub(a, b) { return (a || 0) - (b || 0); },
// relational
'<': function lt(a, b) { return a < b; },
'<=': function le(a, b) { return a <= b; },
Expand Down Expand Up @@ -4074,7 +4074,7 @@ Parser.prototype.expression = function (filterable) {
break;
}

// infix operators
// infix or postfix operators
op = this.operator(true);

if (op === operators['?']) {
Expand Down

0 comments on commit 90a7cdc

Please sign in to comment.