mirror of
https://github.com/taigrr/wails.git
synced 2026-04-14 10:50:53 -07:00
handle Set error on Update method
This commit is contained in:
committed by
Lea Anthony
parent
422ee22d0c
commit
fe2c5e8611
@@ -286,5 +286,8 @@ func (s *Store) Update(updater interface{}) {
|
||||
results := reflect.ValueOf(updater).Call(args)
|
||||
|
||||
// We will only have 1 result. Set the store to it
|
||||
s.Set(results[0].Interface())
|
||||
err = s.Set(results[0].Interface())
|
||||
if err != nil && s.errorHandler != nil {
|
||||
s.errorHandler(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user