Skip to content

Commit

Permalink
Merge pull request #485 from jluchiji/master
Browse files Browse the repository at this point in the history
Fixing a typo in the `getProperties()` utility
  • Loading branch information
keithamus committed Jul 17, 2015
2 parents 6ee53e4 + 6518071 commit e4e439b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/chai/utils/getProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
*/

module.exports = function getProperties(object) {
var result = Object.getOwnPropertyNames(subject);
var result = Object.getOwnPropertyNames(object);

function addProperty(property) {
if (result.indexOf(property) === -1) {
result.push(property);
}
}

var proto = Object.getPrototypeOf(subject);
var proto = Object.getPrototypeOf(object);
while (proto !== null) {
Object.getOwnPropertyNames(proto).forEach(addProperty);
proto = Object.getPrototypeOf(proto);
Expand Down

0 comments on commit e4e439b

Please sign in to comment.