Avoid comparing to js.Undefined() for consistency

This commit is contained in:
Hajime Hoshi
2020-11-21 14:25:17 +09:00
parent 5d8c39028c
commit 4df958c9fd
2 changed files with 5 additions and 6 deletions

View File

@@ -98,7 +98,7 @@ var (
)
func init() {
if !jsutil.Equal(js.Global().Get("WebGL2RenderingContext"), js.Undefined()) {
if js.Global().Get("WebGL2RenderingContext").Truthy() {
isWebGL2Available = true
}
}