Skip to content

Commit

Permalink
Use Array.isArray in the LoopbackPort.
Browse files Browse the repository at this point in the history
  • Loading branch information
yurydelendik committed Aug 23, 2017
1 parent cb10c03 commit 438c0b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/display/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import {
assert, createPromiseCapability, deprecated, getVerbosityLevel,
info, InvalidPDFException, isArray, isArrayBuffer, isInt, isSameOrigin,
info, InvalidPDFException, isArrayBuffer, isInt, isSameOrigin,
loadJpegStream, MessageHandler, MissingPDFException, NativeImageDecoding,
PageViewport, PasswordException, StatTimer, stringToBytes,
UnexpectedResponseException, UnknownErrorException, Util, warn
Expand Down Expand Up @@ -1183,7 +1183,7 @@ class LoopbackPort {
cloned.set(value, result);
return result;
}
result = isArray(value) ? [] : {};
result = Array.isArray(value) ? [] : {};
cloned.set(value, result); // adding to cache now for cyclic references
// Cloning all value and object properties, however ignoring properties
// defined via getter.
Expand Down

0 comments on commit 438c0b2

Please sign in to comment.