Browse Source

Merge pull request #8813 from yurydelendik/loopback-isarray

Use Array.isArray in the LoopbackPort.
Jonas Jenwald 8 years ago committed by GitHub
parent
commit
6433fc8644
  1. 4
      src/display/api.js

4
src/display/api.js

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

Loading…
Cancel
Save