Skip to content

Commit

Permalink
Use mutating array methods where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
stwa committed May 23, 2019
1 parent af17f17 commit b103c0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dom.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let ticker = (function() {
let fns = [];
return {
dispatch(fn) {
fns = [...fns, fn];
fns.push(fn);
},
advance() {
let fn = fns.pop();
Expand Down
2 changes: 1 addition & 1 deletion src/internal/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function queue(nextTick = window.requestAnimationFrame) {

return {
enqueue(fn) {
queue = [...queue, fn];
queue.push(fn);
this.schedule();
},
flush() {
Expand Down

0 comments on commit b103c0d

Please sign in to comment.