arshadashrafi / crypto-js

Automatically exported from code.google.com/p/crypto-js
0 stars 0 forks source link

TypeArray support is broken in Safari #69

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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;
     }

Original issue reported on code.google.com by e...@dnanexus.com on 24 Jan 2013 at 11:04

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by Jeff.Mott.OR on 24 Jan 2013 at 11:46

GoogleCodeExporter commented 8 years ago
r644

Original comment by Jeff.Mott.OR on 25 Jan 2013 at 12:01