Skip to content

Commit

Permalink
fix(android): error on init sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefuge committed Jan 2, 2024
1 parent df92781 commit dc50aea
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/wrapper.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,14 @@ export namespace NATIVE {
Object.keys(otherOptions).forEach(k => {
const methodName = `set${capitalize(k)}`;
if (typeof config[methodName] === 'function') {
config[methodName](otherOptions[k]);
const value = otherOptions[k];
if (typeof value === 'number') {
config[methodName](java.lang.Double.valueOf(value));

} else {
config[methodName](value);

}
}
});
// if (options.sendClientReports) {
Expand Down Expand Up @@ -560,7 +567,7 @@ export namespace NATIVE {
nSentryOptions = config;
sentryOptions = options;
} catch(err) {
console.error('Error starting Sentry', err);
console.error('Error starting Sentry', err, err.stack);
throw err;
}

Expand Down

0 comments on commit dc50aea

Please sign in to comment.