jsutil: Use Equal for Go 1.13

This commit is contained in:
Hajime Hoshi 2020-12-06 03:14:25 +09:00
parent 469dc31765
commit 2bf4a3bb6e

View File

@ -42,7 +42,7 @@ var uint8ArrayObj js.Value
func uint8Array(buffer js.Value, byteOffset, byteLength int) js.Value { func uint8Array(buffer js.Value, byteOffset, byteLength int) js.Value {
if isTypedArrayWritable { if isTypedArrayWritable {
if uint8ArrayObj.IsUndefined() { if Equal(uint8ArrayObj, js.Undefined()) {
uint8ArrayObj = js.Global().Get("Uint8Array").New() uint8ArrayObj = js.Global().Get("Uint8Array").New()
} }
uint8ArrayObj.Set("buffer", buffer) uint8ArrayObj.Set("buffer", buffer)