[Pkg-javascript-commits] [node-tap-mocha-reporter] 68/137: Handle hasOwnProperty not being a function

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:49:27 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-tap-mocha-reporter.

commit aa150ad56ee5d507354428c67d562dbe917ef83e
Author: isaacs <i at izs.me>
Date:   Tue Jun 23 10:22:21 2015 -0700

    Handle hasOwnProperty not being a function
---
 lib/utils.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/utils.js b/lib/utils.js
index 6003768..556afc8 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -462,7 +462,7 @@ function jsonStringify(object, spaces, depth) {
   }
 
   for(var i in object) {
-    if(!object.hasOwnProperty(i)) continue;        // not my business
+    if(!Object.prototype.hasOwnProperty.call(object, i)) continue;        // not my business
     --length;
     str += '\n ' + repeat(' ', space)
       + (isArray(object) ? '' : '"' + i + '": ') // key

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-tap-mocha-reporter.git



More information about the Pkg-javascript-commits mailing list