Usign Array.isArray instead of instanceof Array (had problems with instanceof while running mousetrap in node-webkit)