mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Replace the cloneObj
helper function, in the viewer, with native Object.assign
(PR 9795 follow-up)
This commit is contained in:
parent
40d577d7dd
commit
3c622ef048
4 changed files with 6 additions and 20 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue