Only add the broker if it's available (#264785)

We shouldn't have to do this, but let's see if this resolves issues with users who don't have the broker installed.
This commit is contained in:
Tyler James Leonhardt
2025-09-02 12:28:03 -10:00
committed by GitHub
parent 2b3f8c87cf
commit 151a19f321

View File

@@ -55,7 +55,9 @@ export class CachedPublicClientApplication implements ICachedPublicClientApplica
const nativeBrokerPlugin = new NativeBrokerPlugin();
this.isBrokerAvailable = nativeBrokerPlugin.isBrokerAvailable;
this._logger.info(`[${this._clientId}] Native Broker enabled: ${this.isBrokerAvailable}`);
broker = { nativeBrokerPlugin };
if (this.isBrokerAvailable) {
broker = { nativeBrokerPlugin };
}
} else {
this._logger.info(`[${this._clientId}] Native Broker disabled via settings`);
}