madhums/node-imager — pull request #56 by daniloaburto (2014-01-15 22:52:57+00:00)
Title: [Error: The storage you have specified does not exist] when the Array prototype is extended

The following code doesn't work correctly when the Array class is extended:

for (var i in storage) {
if (!config.storage[storage[i]]) {
throw new Error('The storage you have specified does not exist');
}
}

the code should be:

storage.forEach(function(s) {
if (!config.storage[s]) {
throw new Error('The storage you have specified does not exist');
}
})

code above avoids iterations over extended methods