react-native-square-reader-sdk icon indicating copy to clipboard operation
react-native-square-reader-sdk copied to clipboard

Fix exception when tipSettings is undefined.

Open caleb-harrelson opened this issue 3 years ago • 1 comments

Summary

Fixes an exception TypeError: undefined is not an object (evaluating 'Object.prototype.hasOwnProperty.call(t,o)’) when tipSettings is not defined. tipSettings is supposed to be optional, and suppresses the tip screen when undefined, but a regression was introduced via #148 that forced it to be required and show a tip screen or the unhandled exception would result.

Related issues

Addresses regression in #148, outlined in this PR review (reviewed post release)

Changelog

  • Fix exception when tipSettings is undefined on CheckoutParameter

Test Plan

The bug this fixes is reproducible by trying to start a checkout with tipSettings: undefined (tip screen suppressed). After this fix, the checkout flow will function properly.

caleb-harrelson avatar Oct 05 '22 14:10 caleb-harrelson

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 05 '22 14:10 CLAassistant

PR is already merged.

mansi-square avatar Apr 23 '24 07:04 mansi-square