Skip to content

Commit 1d58079

Browse files
committed
fix: fix error when no options passed
1 parent cb5e5b7 commit 1d58079

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/nssentry.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export namespace NSSentry {
228228
event.setSdk(eventSdk);
229229
}
230230
}
231-
export function startWithDsnString(dsnString: string, options: NativescriptOptions): Promise<Response> {
231+
export function startWithDsnString(dsnString: string, options: NativescriptOptions = {}): Promise<Response> {
232232
return new Promise((resolve, reject) => {
233233
if (initialized) {
234234
console.info('Already started, use existing client', dsnString);

src/nssentry.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export namespace NSSentry {
7878
}
7979
let sentryOptions: NativescriptOptions;
8080
let nSentryOptions: SentryOptions;
81-
export function startWithDsnString(dsnString: string, options: NativescriptOptions): Promise<Response> {
81+
export function startWithDsnString(dsnString: string, options: NativescriptOptions = {}): Promise<Response> {
8282
return new Promise((resolve) => {
8383
sentryOptions = options;
8484
NSSentrySDK.startWithConfigureOptions((obj) => {

0 commit comments

Comments
 (0)