Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7c16662

Browse files
author
James Halliday
committed
fix object.keys shim
1 parent 98c5fd6 commit 7c16662

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎.travis.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js:
3+
- "0.8"
4+
- "0.10"

‎index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ var isArray = Array.isArray || function (x) {
4141
};
4242

4343
var objectKeys = Object.keys || function (obj) {
44-
var has = Object.prototype.hasOwnProperty;
44+
var has = Object.prototype.hasOwnProperty||function(){returntrue};
4545
var keys = [];
4646
for (var key in obj) {
47-
if (has.call(obj)) keys.push(key);
47+
if (has.call(obj,key)) keys.push(key);
4848
}
4949
return keys;
5050
};

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /