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(error-focus-closed): Catching the error from the promise #919

Merged
merged 5 commits into from Nov 4, 2018

Conversation

mcntsh
Copy link
Contributor

@mcntsh mcntsh commented Oct 25, 2018

try { ... } catch ... doesn't work for these cross-domain functions. Doh.

Jon McIntosh added 3 commits October 22, 2018 16:32
If `actions.focus()` throws an error, we can assume something is wrong
and close the window.
…to fix/error-focus-closed

* 'master' of https://github.com/paypal/paypal-checkout:
  4.0.229
  Dist
  fix(callback-api-decorator): Fixing bug where onShippingChange prop was being passed up to parent when it wasnt defined (paypal#918)
  fix(callback-api): Call onError when the prop catches an error (paypal#908)
  fix(callback-api): Adding in `actions.resolve` to shipping change callback (paypal#912)
  style(card-demo): Cleaning up the card demo (paypal#904)
  feat(vue-demo): Adding vue2 integration demo (paypal#905)
  fix(error-focus-closed): Remove error when focusing on closed window (paypal#906)
@mcntsh mcntsh requested a review from bluepnume October 25, 2018 22:47
@bluepnume
Copy link
Contributor

I think we'd need to make sure focus() is consistently promisified in zoid right? Otherwise this might result in null pointers on .catch

@mcntsh
Copy link
Contributor Author

mcntsh commented Nov 2, 2018

In zoid, actions.close is marked as returning ZalgoPromise<void>. I could do a check just in case that changes in the future.

…to fix/error-focus-closed

* 'master' of https://github.com/paypal/paypal-checkout:
  4.0.231
  Dist
  Flush remembered funding after determining all sources
  4.0.230
  Dist
  fix debounce function on click (paypal#927)
  xcomponent to zoid cleanup
  Revert " feat(a11y-trap-tab): Trapping tab gestures in parent window while popup is enabled (paypal#896)"
  Updating Venmo Blacklist (paypal#926)
  Add university tees to blacklist
  Remove top pay button experiment
  Switch to zoid
  reverting bml test code (paypal#917)
@mcntsh
Copy link
Contributor Author

mcntsh commented Nov 2, 2018

@bluepnume I ended up using ZalgoPromise.try since that catches thrown errors and rejected promises 👍

@bluepnume bluepnume merged commit d71800e into paypal:master Nov 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants