diff --git a/lodash.js b/lodash.js index b9d2f73eb..5b8361655 100644 --- a/lodash.js +++ b/lodash.js @@ -1343,6 +1343,7 @@ nativeFloor = Math.floor, nativeGetPrototype = Object.getPrototypeOf, nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = Object.keys, @@ -10724,9 +10725,7 @@ * _.isBuffer(new Uint8Array(2)); * // => false */ - var isBuffer = !Buffer ? stubFalse : function(value) { - return value instanceof Buffer; - }; + var isBuffer = nativeIsBuffer || stubFalse; /** * Checks if `value` is classified as a `Date` object.