From 9f6fbd881dfa6a14da7c30454a52f846a53db833 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Thu, 18 Feb 2021 12:43:13 +0900 Subject: [PATCH] fix glEnumToString for non-numbers --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index 44bd93c0..24a0ff49 100644 --- a/src/utils.js +++ b/src/utils.js @@ -126,7 +126,7 @@ const glEnumToString = (function() { return function glEnumToString(gl, value) { addEnums(gl); - return enums[value] || ("0x" + value.toString(16)); + return enums[value] || (typeof value === 'number' ? `0x${value.toString(16)}` : value); }; }());