mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 16:51:16 +08:00
handle Set error on Update method
This commit is contained in:
parent
422ee22d0c
commit
fe2c5e8611
@ -34,3 +34,4 @@ Wails is what it is because of the time and effort given by these great people.
|
||||
* [Tim Kipp](https://github.com/timkippdev)
|
||||
* [Dmitry Gomzyakov](https://github.com/kyoto44)
|
||||
* [Arthur Wiebe](https://github.com/artooro)
|
||||
* [Ilgıt Yıldırım](https://github.com/ilgityildirim)
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user