Skip to content

Non-standard behavior of Promise.prototype.finally #19490

@leeyeh

Description

@leeyeh

Environment

Environment:
  OS: macOS High Sierra 10.13.4
  Node: 9.11.1
  Yarn: 1.7.0
  npm: 6.1.0
  Watchman: 4.9.0
  Xcode: Xcode 9.3.1 Build version 9E501
  Android Studio: 3.1 AI-173.4670197

Packages: (wanted => installed)
  react: 16.3.1 => 16.3.1
  react-native: ~0.55.2 => 0.55.4

Steps to Reproduce

https://snack.expo.io/r1wCcj5JQ

Expected Behavior

console: 42

Actual Behavior

console: undefined


I did some digging around, finding that the polyfilled Promise imported from fbjs is not implemented right:

https://github.com/facebook/fbjs/blob/v0.8.16/src/__forks__/Promise.native.js#L18-L23

There is already an issue about this years ago: facebook/fbjs#132

Another related issue: #17972

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugJavaScriptResolution: LockedThis issue was locked by the bot.📮Known IssuesThis indicates an issue that refers to a bug or limitation of RN that is not currently being handled

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions