Skip to content

Commit b835243

Browse files
author
SentienceDEV
committed
fix playwright grantPermissions call to pass {origin}
1 parent 9d2dba8 commit b835243

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/browser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ export class SentienceBrowser implements IBrowser {
188188
await context.setGeolocation(policy.geolocation);
189189
}
190190
if (policy.autoGrant && policy.autoGrant.length > 0) {
191-
await context.grantPermissions(policy.autoGrant, policy.origin);
191+
const options = policy.origin ? { origin: policy.origin } : undefined;
192+
await context.grantPermissions(policy.autoGrant, options);
192193
}
193194
}
194195

0 commit comments

Comments
 (0)