docx4js icon indicating copy to clipboard operation
docx4js copied to clipboard

upload .docx file to demo, error: TypeError: Cannot convert undefined or null to object

Open En777 opened this issue 2 years ago • 1 comments

Uncaught (in promise) TypeError: Cannot convert undefined or null to object at Function.assign () at _class._init (officeDocument.js:16:16) at _class._init (officeDocument.js:6:3) at _class.Part (part.js:31:8) at _class (officeDocument.js:2:1) at new _class (officeDocument.js:2:1) at _class (document.js:9:23) at new _class (document.js:2:1) at parse (document.js:177:14) at reader.onload (document.js:194:6)

En777 avatar Jan 17 '23 02:01 En777

same error as https://github.com/VolodymyrBaydalka/docxjs/issues/58

I fix it at my fork , maybe it not best https://github.com/En777/docxjs-word-preview/commit/9eed2dbb212de225c60dd619c69cb4ea70377780

and my npm package https://www.npmjs.com/package/docx-preview-lib

En777 avatar Jan 17 '23 05:01 En777