Uncaught TypeError: createOrder is not a function
**Expected behavior**
Coerce the amount to $0 or catch the exception and provide a more robust error
**Desktop (please complete the following information):**
- OS: windows
- Browser: chrome 84.0.4147.125
- React Version: 16.8.4
To Do First
Software Package Version: 2.6.2
Describe the bug The logic for createOrder ternary should not rely on amount prop. Causes an error when amount and createOrder are both undefined.
https://github.com/Luehang/react-paypal-button-v2/blob/d819579f77723d2a361476e41e231708a6b8c01c/src/index.tsx#L189
To Reproduce
Uncaught TypeError: createOrder is not a function **Expected behavior** Coerce the amount to $0 or catch the exception and provide a more robust error **Desktop (please complete the following information):** - OS: windows - Browser: chrome 84.0.4147.125 - React Version: 16.8.4