Skip to content

Commit

Permalink
Use exportTo browser.geolocation
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Nov 5, 2024
1 parent 72cbca6 commit d9fec3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions browser/browser_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ func parseBrowserContextOptions(ctx context.Context, opts sobek.Value) (*common.
b.ExtraHTTPHeaders[k] = headers.Get(k).String()
}
case "geolocation":
geolocation := common.NewGeolocation()
if err := geolocation.Parse(ctx, o.Get(k).ToObject(rt)); err != nil {
gl, err := exportTo[*common.Geolocation](rt, o.Get(k))
if err != nil {
return nil, fmt.Errorf("parsing geolocation options: %w", err)
}
b.Geolocation = geolocation
b.Geolocation = gl
case "hasTouch":
b.HasTouch = o.Get(k).ToBoolean()
case "httpCredentials":
Expand Down

0 comments on commit d9fec3d

Please sign in to comment.