SPFx Web Context Returning Parent's Properties

Copper Contributor

I am developing a web-part for SharePoint Online using SPFx and the UI Fabric module.
Currently require the server relative Url of the SPWeb hosting the web-part so that I can make API calls to MS Graph, however the web context is returning its parent's values.

 

Therefore running

Alert(this.context.pageContext.web.serverRelativeUrl)

displays the Url of its parent, not the current web.

 

Struggling to find resources which address this, any help is much appreciated.

0 Replies