Browse Source

remove hasOwnProperty usage

Gregg Tavares 6 years ago
parent
commit
105d0731d7
1 changed files with 4 additions and 6 deletions
  1. 4 6
      threejs/resources/webgl-debug-helper.js

+ 4 - 6
threejs/resources/webgl-debug-helper.js

@@ -544,12 +544,10 @@
     // Override the getError function with one that returns our saved results.
     // Override the getError function with one that returns our saved results.
     if (wrapper.getError) {
     if (wrapper.getError) {
       wrapper.getError = function() {
       wrapper.getError = function() {
-        for (const err in glErrorShadow) {
-          if (glErrorShadow.hasOwnProperty(err)) {
-            if (glErrorShadow[err]) {
-              glErrorShadow[err] = false;
-              return err;
-            }
+        for (const err of glErrorShadow) {
+          if (glErrorShadow[err]) {
+            glErrorShadow[err] = false;
+            return err;
           }
           }
         }
         }
         return ctx.NO_ERROR;
         return ctx.NO_ERROR;