Instead of doing a typescript update and fixing other build errors with the update, removing the conditional operators instead. They have been defined like this at the start:
export function getPageContext(): IPageContext {
if (!hostPageContext) {
throw new Error(getWaitForReadyError("getPageContext"));
}
return hostPageContext;
}
Instead of doing a typescript update and fixing other build errors with the update, removing the conditional operators instead. They have been defined like this at the start:
let teamContext: ITeamContext | undefined;
let webContext: IWebContext | undefined;;
let hostPageContext: IPageContext | undefined;
And there's a null check, example: