Add WebGL extensions names

This commit is contained in:
Christoph Diehl 2018-04-25 14:22:20 -07:00
parent e245d40e38
commit 15579c705c
No known key found for this signature in database
GPG key ID: 799CE5B68FEF404A

View file

@ -816,7 +816,9 @@ class webgl extends make {
if (pattern) {
let candidates = []
extensions.forEach((ext) => ext.includes(pattern) ? candidates.push(ext) : '')
return random.item(candidates)
if (candidates.length >= 0) {
return random.item(candidates)
}
}
return random.item(extensions)