react-native-square-reader-sdk
react-native-square-reader-sdk copied to clipboard
Fix exception when tipSettings is undefined.
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
tipSettingsis undefined onCheckoutParameter
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.
PR is already merged.