mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
Fix test fails in Safari 5.
This commit is contained in:
13
lodash.js
13
lodash.js
@@ -660,7 +660,6 @@
|
||||
bufferSlice = isNative(bufferSlice = ArrayBuffer && new ArrayBuffer(0).slice) && bufferSlice,
|
||||
ceil = Math.ceil,
|
||||
clearTimeout = context.clearTimeout,
|
||||
Float64Array = isNative(Float64Array = context.Float64Array) && Float64Array,
|
||||
floor = Math.floor,
|
||||
getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
|
||||
hasOwnProperty = objectProto.hasOwnProperty,
|
||||
@@ -672,6 +671,18 @@
|
||||
Uint8Array = isNative(Uint8Array = context.Uint8Array) && Uint8Array,
|
||||
unshift = arrayProto.unshift;
|
||||
|
||||
/** Used to clone array buffers */
|
||||
var Float64Array = (function() {
|
||||
// Safari 5 errors when using an array buffer to initialize a typed array
|
||||
// where the array buffer's `byteLength` is not a multiple of the typed
|
||||
// array's `BYTES_PER_ELEMENT`
|
||||
try {
|
||||
var func = isNative(func = context.Float64Array) && func,
|
||||
result = new func(new ArrayBuffer(10), 0, 1) && func;
|
||||
} catch(e) { }
|
||||
return result;
|
||||
}());
|
||||
|
||||
/** Used to set metadata on functions */
|
||||
var defineProperty = (function() {
|
||||
// IE 8 only accepts DOM elements
|
||||
|
||||
Reference in New Issue
Block a user