Export to GitHub

crypto-js - issue #69

TypeArray support is broken in Safari


Posted on Jan 24, 2013 by Quick Kangaroo

TypedArray support is broken in Safari due to the initial check in lib-typedarrays.js. In Safari, typeof ArrayBuffer is an 'object'. Here is a patch that works for all browsers.

Index: lib-typedarrays.js

--- lib-typedarrays.js (revision 643) +++ lib-typedarrays.js (working copy) @@ -1,6 +1,6 @@ (function () { // Check if typed arrays are supported - if (typeof ArrayBuffer != 'function') { + if (typeof ArrayBuffer === 'undefined') { return; }

Attachments

Comment #1

Posted on Jan 24, 2013 by Happy Horse

(No comment was entered for this change.)

Comment #2

Posted on Jan 25, 2013 by Happy Horse

r644

Status: Accepted

Labels:
Type-Defect Priority-Medium