加载项请求重复数据时e.importFromSeriesTimeJsonObject中的OWA崩溃

问题描述

新的Outlook日历条目。设置定期(例如每天几天)并启动Outlook加载项。

Outlook加载项代码

const stLocal: Date = await GetoutlookTimeAsync(this.OutlookEvent.start);
const edLocal: Date = await GetoutlookTimeAsync(this.OutlookEvent.end);
const recurrence: Office.Recurrence = await GetoutlookStructureAsync("recurrence",this.OutlookEvent.recurrence);

.. snip ..

export const GetoutlookStructureAsync = (func: string,evt: any) => {
  return new Promise<any>((resolve,reject) => {
    const who: string = "GetoutlookStructure " + func;
    DebugLog(who,"Start");
    evt.getAsync((asyncResult: Office.AsyncResult<any>) => {
      if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
        DebugLog(who,JSON.stringify(asyncResult.value));
        resolve(asyncResult.value);
      } else {
        const errorText: string = asyncResult.error.message;
        DebugLog(who,errorText);
        reject(new Error(errorText));
      }
    });
  });
};

浏览器控制台显示

Uncaught TypeError: Cannot read property 'startYear' of undefined
 at e.importFromSeriesTimeJsonObject (outlook-web-16.01.js:19)
 at Ta (outlook-web-16.01.js:19)
 at (outlook-web-16.01.js:19)
 at Object.a [as callback]  (outlook-web-16.01.js:19)
 at L (outlook-web-16.01.js:19)

enter image description here

解决方法

此错误当前正在此处跟踪: https://github.com/OfficeDev/office-js/issues/1312