frankkohlhepp/store-js — Issue #1: IE8 Blows Up - Object.keys
Author: pctj101
Created: 2011-11-09 20:08:42+00:00
State: open

Since IE8 doesn't have Object.keys it pukes all over the place.

I have no idea what this JS does, but put before store.js loads, it makes IE8 all happy.

/* Fix IE8 Object.keys */
if(!Object.keys) Object.keys = function(o){
if (o !== Object(o))
throw new TypeError('Object.keys called on non-object');
var ret=[],p;
for(p in o) if(Object.prototype.hasOwnProperty.call(o,p)) ret.push(p);
return ret;
}