简体   繁体   中英

TypeError: Cannot read property 'name' of undefined, at Array.forEach

When I press the button to display the task pane, I am seeing the following error message in the console window which I cannot remove or explain?

"Uncaught (in promise) TypeError: Cannot read property 'name' of undefined"
at t (word-web-16.00.js:26)
at word-web-16.00.js:26
at Office.js:46
at Array.forEach ()
at d (Office.js:46)
at Office.js:46

在此处输入图像描述

Steps to Reproduce - Side load the TypeScript add-in into Word Online and press the Button to display the task pane.

The task pane is displayed but why is this error message appearing.

This error message might have always been there, not sure. I have tried all the following URLs and the message is consist.

src="appsforoffice.microsoft.com/lib/beta/hosted/Office.js"
src="appsforoffice.microsoft.com/lib/1/hosted/Office.js"
src="appsforoffice.microsoft.com/lib/1.1/hosted/Office.js"

This appears in Word Online Windows 10 64 bit and Office 64 bit Browser - Microsoft Edge, Version 88.0.705.68 (Official build) (64-bit)

The following repository contains the project (only 5 files): https://github.com/OfficeAddins/undefined

This issue was logged on github but no-one has replied yet: https://github.com/OfficeDev/office-js/issues/1644

Can you try using this using lowercase o when referencing the office.js url - src="appsforoffice.microsoft.com/lib/beta/hosted/office.js"

This could be due to a case sensitive string comparison bug, which we will fix. You should be able to workaround it by using the lowercase office.js.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM