Skip to content

Conversation

@matmar10
Copy link

@matmar10 matmar10 commented Apr 5, 2020

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 98.011% when pulling fd6e3dd on matmar10:issue-81-duplicate-resolution-of-promises into ae6ad3f on straker:master.

@matmar10 matmar10 marked this pull request as ready for review April 5, 2020 07:40
const promises = [];
files.forEach(function(data) {
const result = callback.apply(null, data);
if ('object' === typeof result && result.then) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. How are you using the callback function in this case? I'm curious what the returned Promise is doing.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, wouldn't it be easier to ask if it was Promise? if (result instanceof Promise)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants