Use Array.isArray instead of instanceof Array
authorRaphaël Jakse <raphael.jakse@univ-grenoble-alpes.fr>
Sun, 5 Apr 2020 16:16:45 +0000 (18:16 +0200)
committerRaphaël Jakse <raphael.jakse@univ-grenoble-alpes.fr>
Sun, 5 Apr 2020 16:16:45 +0000 (18:16 +0200)
trivabble.js

index 7f14c8647d3b0ae3271e9574d9cce41728c9ec53..2ab37b3273c8122cd47b5da1281003ffe7b22b56 100644 (file)
@@ -588,7 +588,7 @@ let tile;
     }
 
     function handleReceivedData(data) {
-        if (data instanceof Array) {
+        if (Array.isArray(data)) {
             data.forEach(handleReceivedData);
             return;
         }