Closed vbauerster closed 6 years ago
while the map being an Object
instead of an Array
is 👍 , all the other changes are unnecessary:
Object.hasOwnProperty
is potentially slower (and unnecessary - there's no gain)undefined
to void 0
change - unnecessary, this is minifier's jobx || (x = [])
to x = x || []
change - ¯\_(ツ)_/¯
I've updated, according your recommendations.
Prevent code from fail, if img element will have 'hasOwnProperty' class name, for whatever reason. Unified undefined use, same style as used in forEach polyfill.