Skip to content

Commit

Permalink
v3.0.1. Fixed bug where GawkArray#splice() was emitting multiple ch…
Browse files Browse the repository at this point in the history
…ange events instead of one.
  • Loading branch information
cb1kenobi committed Nov 16, 2016
1 parent 75b9ee9 commit 5e24d5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gawk",
"version": "3.0.0",
"version": "3.0.1",
"description": "Observable JavaScript object model",
"main": "./dist/index.js",
"author": "Chris Barber <[email protected]> (https://github.com/cb1kenobi)",
Expand Down
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ export class GawkArray extends Array {
* @access public
*/
splice(start, deleteCount, ...items) {
this.__gawk__.pause();

if (start !== undefined && deleteCount === undefined) {
deleteCount = this.length - start;
}
Expand All @@ -253,7 +255,7 @@ export class GawkArray extends Array {
}
}

this.__gawk__.notify();
this.__gawk__.resume();
return arr;
}

Expand Down

0 comments on commit 5e24d5f

Please sign in to comment.