Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@andrewnicols
Created March 10, 2020 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewnicols/16c01602ff83e9fbd11b227f7bc013f5 to your computer and use it in GitHub Desktop.
Save andrewnicols/16c01602ff83e9fbd11b227f7bc013f5 to your computer and use it in GitHub Desktop.
import PendingPromise from 'core/pending';
export default (...args) => {
const pendingPromise = new PendingPromise('core/promise');
return Promise.resolve.apply(this, args)
.then(result => {
pendingPromise.resolve();
return new Promise().resolve.apply(this, result);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment