Skip to content

Commit

Permalink
Allow internal nextTick utility to use microtasks when possible.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Apr 26, 2018
1 parent 5bbf4a4 commit 5a678c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addon-test-support/@ember/test-helpers/-utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Promise } from 'rsvp';

export const nextTick = setTimeout;
export const nextTick =
typeof Promise === 'undefined' ? setTimeout : cb => Promise.resolve().then(cb);
export const futureTick = setTimeout;

/**
Expand Down

0 comments on commit 5a678c7

Please sign in to comment.