mirror of
https://github.com/pion/mediadevices.git
synced 2026-04-22 15:57:27 +08:00
Use isZero for reflection (#655)
This commit is contained in:
+1
-3
@@ -86,10 +86,8 @@ func (p *Media) merge(o any, set setterFn) {
|
||||
continue
|
||||
}
|
||||
|
||||
// TODO: Replace this with fieldB.IsZero() when we move to go1.13
|
||||
// If non-boolean or non-discrete values are zeroes we skip them
|
||||
if fieldB.Interface() == reflect.Zero(fieldB.Type()).Interface() &&
|
||||
fieldB.Kind() != reflect.Bool {
|
||||
if fieldB.IsZero() && fieldB.Kind() != reflect.Bool {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user