react-facebook icon indicating copy to clipboard operation
react-facebook copied to clipboard

Uncaught Promise rejection error when closing Share popup

Open hyphmongo opened this issue 6 years ago • 1 comments

When using the Share component it will successfully bring up the popup window. But clicking the cross in top right of the window, without completing a share, throws an uncaught promise rejection error

<Share href="https://example.com"}>
  {({ handleClick, loading }) => (
    <Icon
      onClick={handleClick}
      disabled={loading}
    />
  )}
</Share>

image

hyphmongo avatar Jul 16 '19 16:07 hyphmongo

From what I can see, the ui method, which is used for the share component, is returning undefined (coming from the fb api) instead of something like {authResponse: undefined, status: "unknown"} what they do with the getTokenDetailWithProfile method (used for the login component). It doesn't harm anything, but I created a PR that will hide the error if it's the ui method, since I am not sure if something else is depending on the check.

glenngijsberts avatar Jul 26 '19 10:07 glenngijsberts