w3c / apiary

Simple JS library to use the W3C API in a declarative way
MIT License
13 stars 8 forks source link

Fix bug using Object.keys() in IE9 #24

Closed tripu closed 9 years ago

tripu commented 9 years ago

Object.keys() is supported in IE9, but its behaviour when it receives a String is different compared to Chrom* and FF:

*Chrom, FF:**

Object.keys('foo')
["0", "1", "2"]

IE9

Object.keys('foo')
Error

This PR should fix the bug that Philipp Hoschka found in IE.

tagawa commented 9 years ago

I don't have IE to test right now but the code looks good.