Skip to content

Commit c966c3c

Browse files
authored
Merge pull request #1122 from go-kivik/allowNilOptions
Don't crash for nil options
2 parents 3857b3e + 069d62d commit c966c3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

x/options/options.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ type Map map[string]any
3636
// New creates a new optsMap from the given driver.Options.
3737
func New(options driver.Options) Map {
3838
opts := map[string]any{}
39-
options.Apply(opts)
39+
if options != nil {
40+
options.Apply(opts)
41+
}
4042
return opts
4143
}
4244

0 commit comments

Comments
 (0)