Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 505275f

Browse files
committed
Use exportTo browser.geolocation
1 parent 42f6793 commit 505275f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

browser/browser_mapping.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ func parseBrowserContextOptions(ctx context.Context, opts sobek.Value) (*common.
144144
b.ExtraHTTPHeaders[k] = headers.Get(k).String()
145145
}
146146
case "geolocation":
147-
geolocation := common.NewGeolocation()
148-
if err := geolocation.Parse(ctx, o.Get(k).ToObject(rt)); err != nil {
147+
gl, err := exportTo[*common.Geolocation](rt, o.Get(k))
148+
if err != nil {
149149
return nil, fmt.Errorf("parsing geolocation options: %w", err)
150150
}
151-
b.Geolocation = geolocation
151+
b.Geolocation = gl
152152
case "hasTouch":
153153
b.HasTouch = o.Get(k).ToBoolean()
154154
case "httpCredentials":

0 commit comments

Comments
 (0)