Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect link behaviour introduced with promise addition in ios postlink script #1003

Merged
merged 2 commits into from
Sep 19, 2017

Conversation

ruslan-bikkinin
Copy link
Contributor

Due to promise usage in ios postlink script all postlink scripts should be promisified. This PR provide fix for this.

Also its related to #999

@msftclas
Copy link

@ruslan-bikkinin,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


//run them sequentially
var result = postlinks.reduce((p, fn) => p.then(fn), Promise.resolve());
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need result variable here?
Would it probably better to do the following:

postlinks.reduce((p, fn) => p.then(fn), Promise.resolve())
    .catch((err) => {
        console.error(err.message);
    });

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not at all, I'll simplify it as you suggested, @sergey-akhalkov, thx!

@fungilation
Copy link

Confirmed fix: #999 (comment)

@ruslan-bikkinin ruslan-bikkinin merged commit b449441 into microsoft:master Sep 19, 2017
@ruslan-bikkinin ruslan-bikkinin deleted the fix-postlink branch September 19, 2017 14:07
ruslan-bikkinin added a commit to ruslan-bikkinin/react-native-code-push that referenced this pull request Sep 21, 2017
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.

None yet

4 participants