Closed kbrandl closed 7 years ago
We added and imported this file for some useful string functions:
https://github.com/metronical/metron/blob/master/src/metron.extenders.ts
This caused the issue. We had to remove all instances of the import to fix it.
We didn't want the entire metron library https://github.com/metronical/metron) and this in itself may have caused some inconsistencies.
Thanks for the update @BizH. Do I understand correctly that you've resolved this problem and this issue can be closed?
Closing this issue, as BizH has confirmed it is resolved (see prior comment in this thread).
Hi, I am seeing a similar issue when using OfficeJS in an Angular 2 application. The full erro stack is as below -
{"description":"Unable to set property 'isValid' of undefined or null reference","number":-2146823281,"stack":"TypeError: Unable to set property 'isValid' of undefined or null reference\n at Anonymous function (https://appsforoffice.microsoft.com/lib/beta/hosted/word-win32-16.01.js:21:264919)\n at ZoneDelegate.prototype.invoke (eval code:386:13)\n at onInvoke (eval code:4976:17)\n at ZoneDelegate.prototype.invoke (eval code:386:13)\n at Zone.prototype.run (eval code:138:17)\n at Anonymous function (eval code:872:17)\n at ZoneDelegate.prototype.invokeTask (eval code:419:13)\n at onInvokeTask (eval code:4967:17)\n at ZoneDelegate.prototype.invokeTask (eval code:419:13)\n at Zone.prototype.runTask (eval code:188:21)"}
Any help will be much appreciated!
Logging this issue to track a bug reported by a customer in this Stack Overflow post: https://stackoverflow.com/questions/45927586/office-js-typescript-metron-extender-error.
From the post:
If you import
metron.extender
into any TS or JXS file (even if you don't use it), none of the Office API (likeExcel.run(ctx)
will work). If you trap the error, you will get something like:Unable to set property 'isValid' of undefined or null reference
.(If/when I'm able to get more detailed repro steps from the customer, I'll add that info this issue.)