mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 06:20:48 +08:00
Add nil guard for binding
This commit is contained in:
parent
7573f68df3
commit
e6b40b55c4
@ -25,6 +25,9 @@ func NewBindings(logger *logger.Logger, structPointersToBind []interface{}, exem
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, exemption := range exemptions {
|
for _, exemption := range exemptions {
|
||||||
|
if exemptions == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
name := runtime.FuncForPC(reflect.ValueOf(exemption).Pointer()).Name()
|
name := runtime.FuncForPC(reflect.ValueOf(exemption).Pointer()).Name()
|
||||||
// Yuk yuk yuk! Is there a better way?
|
// Yuk yuk yuk! Is there a better way?
|
||||||
name = strings.TrimSuffix(name, "-fm")
|
name = strings.TrimSuffix(name, "-fm")
|
||||||
|
Loading…
Reference in New Issue
Block a user