Fix network monitor

This commit is contained in:
世界 committed 2023-08-20 13:30:50 +08:00
1 parent 2675aff98a
commit 90b3aad83a
21 files changed
+79 -80

No files matched your search

+3 -3
View File
@@ -98,9 +98,9 @@ func (l *Listable[T]) UnmarshalJSON(content []byte) error {
return nil
}
var singleItem T
err = json.Unmarshal(content, &singleItem)
if err != nil {
return err
newError := json.Unmarshal(content, &singleItem)
if newError != nil {
return E.Errors(err, newError)
}
*l = []T{singleItem}
return nil