Replace the cloneObj helper function, in the viewer, with native Object.assign (PR 9795 follow-up)

This commit is contained in:
Jonas Jenwald 2018-06-27 20:39:39 +02:00
parent 40d577d7dd
commit 3c622ef048
4 changed files with 6 additions and 20 deletions

View file

@ -611,16 +611,6 @@ function isPortraitOrientation(size) {
return size.width <= size.height;
}
function cloneObj(obj) {
let result = Object.create(null);
for (let i in obj) {
if (Object.prototype.hasOwnProperty.call(obj, i)) {
result[i] = obj[i];
}
}
return result;
}
const WaitOnType = {
EVENT: 'event',
TIMEOUT: 'timeout',
@ -842,7 +832,6 @@ export {
VERTICAL_PADDING,
isValidRotation,
isPortraitOrientation,
cloneObj,
PresentationModeState,
RendererType,
TextLayerMode,