mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +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
|
@ -14,8 +14,7 @@
|
|||
*/
|
||||
|
||||
import {
|
||||
cloneObj, getPageSizeInches, getPDFFileNameFromURL, isPortraitOrientation,
|
||||
NullL10n
|
||||
getPageSizeInches, getPDFFileNameFromURL, isPortraitOrientation, NullL10n
|
||||
} from './ui_utils';
|
||||
import { createPromiseCapability } from 'pdfjs-lib';
|
||||
|
||||
|
@ -161,7 +160,7 @@ class PDFDocumentProperties {
|
|||
if (fileSize === this.fieldData['fileSize']) {
|
||||
return; // The fileSize has already been correctly set.
|
||||
}
|
||||
let data = cloneObj(this.fieldData);
|
||||
let data = Object.assign(Object.create(null), this.fieldData);
|
||||
data['fileSize'] = fileSize;
|
||||
|
||||
freezeFieldData(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue