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 5606306 commit e8e65ae
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 e8e65ae

Please sign in to comment.