Using Array.isArray for Array testing in findModulePath.
authorHerbert Vojčík <herby@mailbox.sk>
Sat, 14 Aug 2010 23:13:54 +0000 (01:13 +0200)
committerRyan Dahl <ry@tinyclouds.org>
Sun, 15 Aug 2010 18:05:48 +0000 (11:05 -0700)
src/node.js

index 2dcef799d110a35f197502be3bcbb4f3df3de767..9833e76108bd64b5d3d5918d2d225c4a9b747000 100644 (file)
@@ -152,7 +152,7 @@ var module = (function () {
 
   /* Sync unless callback given */
   function findModulePath (id, dirs, callback) {
-    process.assert(dirs.constructor == Array);
+    process.assert(Array.isArray(dirs));
 
     if (/^https?:\/\//.exec(id)) {
       if (callback) {