-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Labels
Description
I'm getting some errors when using DataCollector:
null is not an object (evaluating 'Object.keys(i)')
I use the code like this:
try {
const dataCollector = await braintree.dataCollector.create({client: clientInstance, kount: true, paypal: true});
this.deviceData.value = await dataCollector.getDeviceData();
} catch (error) {
...
}
Upon investigation, the error occurs in camel-case-to-snake-case.js,
} else if (typeof input === "object") {
converted = Object.keys(input).reduce(function (newObj, key) {
because typeof null is object!
The helper function is used by getDeviceData(), but since I await the .create(), deviceSessionId and deviceData should be available...
Reactions are currently unavailable