mirror of
https://github.com/emn178/js-md5.git
synced 2026-08-13 04:51:44 +08:00
Fixed root is undefined in some special environment. #7
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
Array.prototype.toHexString = ArrayBuffer.prototype.toHexString = function () {
|
||||
var array = new Uint8Array(this);
|
||||
var hex = '';
|
||||
for (var i = 0;i < array.length;++i) {
|
||||
for (var i = 0; i < array.length; ++i) {
|
||||
var c = array[i].toString('16');
|
||||
hex += c.length == 1 ? '0' + c : c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user