Skip to content

Commit e3dd646

Browse files
committed
simplify
1 parent 7832ad4 commit e3dd646

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

db/revtree.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,13 @@ func (tree *RevTree) UnmarshalJSON(inputjson []byte) (err error) {
181181
(*tree)[rep.Revs[i]] = info
182182
}
183183

184-
if len(rep.ChannelsMap) > 0 {
185-
for iStr, channels := range rep.ChannelsMap {
186-
i, err := strconv.ParseInt(iStr, 10, 64)
187-
if err != nil {
188-
return err
189-
}
190-
info := (*tree)[rep.Revs[i]]
191-
info.Channels = channels
184+
for iStr, channels := range rep.ChannelsMap {
185+
i, err := strconv.ParseInt(iStr, 10, 64)
186+
if err != nil {
187+
return err
192188
}
189+
info := (*tree)[rep.Revs[i]]
190+
info.Channels = channels
193191
}
194192

195193
// we shouldn't be in a situation where we have both channels and channelsMap populated, but we still need to handle the old format

0 commit comments

Comments
 (0)