fix Object.keys shim (no one noticed it was broken...)
This commit is contained in:
parent
b4aea00449
commit
ff3bf87589
@ -168,10 +168,9 @@
|
|||||||
}
|
}
|
||||||
if (!Object.keys) {
|
if (!Object.keys) {
|
||||||
Object.keys = function(o) {
|
Object.keys = function(o) {
|
||||||
var key, _i, _len, _results;
|
var key, _results;
|
||||||
_results = [];
|
_results = [];
|
||||||
for (_i = 0, _len = o.length; _i < _len; _i++) {
|
for (key in o) {
|
||||||
key = o[_i];
|
|
||||||
_results.push(key);
|
_results.push(key);
|
||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
|
|||||||
@ -102,7 +102,7 @@ if console?
|
|||||||
# XXX opera cannot into Object.keys
|
# XXX opera cannot into Object.keys
|
||||||
if not Object.keys
|
if not Object.keys
|
||||||
Object.keys = (o) ->
|
Object.keys = (o) ->
|
||||||
key for key in o
|
key for key of o
|
||||||
|
|
||||||
# flatten the config
|
# flatten the config
|
||||||
conf = {}
|
conf = {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user