diff --git a/README.md b/README.md index 88a069b..f8e0708 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ import promisePoller, { CANCEL_TOKEN } from 'promise-poller'; const taskFn = () => { return new Promise((resolve, reject) => { - doAsyncStuff.then(resolve, error => { + doAsyncStuff().then(resolve, error => { if (error === 'invalid password') { reject(CANCEL_TOKEN); // will cancel polling } else {