From 02cd18081e98b86cc2c48fa271aac677276e36af Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Fri, 12 Oct 2018 12:10:23 +0300 Subject: [PATCH] js: Valid now checks for zero value --- js/js.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/js.go b/js/js.go index 81b5986..5652ac7 100644 --- a/js/js.go +++ b/js/js.go @@ -111,7 +111,7 @@ func (v Value) IsUndefined() bool { // Valid checks if object is defined and not null. func (v Value) Valid() bool { - return !v.IsNull() && !v.IsUndefined() + return !v.isZero() && !v.IsNull() && !v.IsUndefined() } // Get returns the JS property by name.