[Pkg-javascript-commits] [node-sha.js] 128/237: check if DataView exist before using instanceof check
Bastien Roucariès
rouca at moszumanska.debian.org
Fri May 5 09:03:46 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-sha.js.
commit 9983eb4d376e241a8eea04854a0da01fde8d5c50
Author: Tim Beyer <tim.beyer at gmail.com>
Date: Sat Aug 30 18:19:03 2014 +0200
check if DataView exist before using instanceof check
---
sha1.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sha1.js b/sha1.js
index bde58ae..2b5a09c 100644
--- a/sha1.js
+++ b/sha1.js
@@ -54,7 +54,7 @@ module.exports = function (Buffer, Hash) {
// and that if it is the last block, it already has the length and the 1 bit appended.
- var isDV = new Buffer(1) instanceof DataView
+ var isDV = (typeof DataView !== 'undefined') && (new Buffer(1) instanceof DataView)
function readInt32BE (X, i) {
return isDV
? X.getInt32(i, false)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-sha.js.git
More information about the Pkg-javascript-commits
mailing list