SPFX WebPart consuming Graph api to display events is not working in IE11

Copper Contributor

I have created SPFX Webpart which displays calendar events using Graph API. It is working in Chrome but not in IE11

 

Im getting  error (in the attachment) in IE11 when trying to display upcoming events using Graph API in my spfx webpart:
SPFX Version: 1.9.1
im getting response null in IE11 but its working in chrome or Edge

5 Replies

@avinash1239 a null or undefined check at the specific error line should resolve the error. The browsers must be behaving differently with a specific object that you have.

Alternatively, if this related to a browser feature, check if you need to include a polyfill to make it compatible with IE.

@Joel Rodrigues I have done that , I am getting the same error.

@avinash1239 can you share the error details, not just the message, and also the line of code where that is happening (if it doesn't contain anything confidential)?

@Joel Rodrigues 

var currentDate = 'end/Datetime ge 2020-02-11T00:00:00.000'

 msgraphclient.api('/me/calendar/events'
     .version("v1.0")   
   .filter(currentDate
     .orderby("start/dateTime")
     .top(3)
     .get( (error:any,eventsResponse:any,rawResponse?:any)=>{
          const calendarEvents:MicrosoftGraph.Event[]=eventsResponse.value;
          console.log(calendarEvents);
   
    });
 
If I remove the filter condition ,its working fine
Just to validate, do other requests to graph from your code work from IE?
Is the eventsResponse object exactly the same (same properties) when executing from IE and a different browser?

It doesn't seem to