Skip to content

Commit 2ac8397

Browse files
committed
rix: err when check value
1 parent eabe23e commit 2ac8397

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

bracket.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ func (b bracketsNode) Int64(address ...int) int64 {
158158

159159
n, err := b.getNode(address)
160160
if err != nil ||
161-
!b.value() ||
162-
len(b.Text) == 0 {
161+
!n.value() ||
162+
len(n.Text) == 0 {
163163
return 0
164164
}
165165

@@ -171,8 +171,8 @@ func (b bracketsNode) Bool(address ...int) bool {
171171

172172
n, err := b.getNode(address)
173173
if err != nil ||
174-
!b.value() ||
175-
len(b.Text) == 0 {
174+
!n.value() ||
175+
len(n.Text) == 0 {
176176
return false
177177
}
178178
val, _ := strconv.ParseBool(n.Text)
@@ -183,8 +183,8 @@ func (b bracketsNode) Float64(address ...int) float64 {
183183

184184
n, err := b.getNode(address)
185185
if err != nil ||
186-
!b.value() ||
187-
len(b.Text) == 0 {
186+
!n.value() ||
187+
len(n.Text) == 0 {
188188
return 0
189189
}
190190

0 commit comments

Comments
 (0)