@crowdstrike/foundry-js 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2975,12 +2975,15 @@ class FalconApi {
2975
2975
  * This establishes a connection to send messages between the extension and the Falcon Console. Only when established you will be able to call other APIs.
2976
2976
  */
2977
2977
  async connect() {
2978
- const { origin, data } = await this.bridge.postMessage({ type: 'connect' });
2979
- this.bridge.setOrigin(origin);
2980
- this.data = data;
2981
- this.updateTheme(data?.theme);
2978
+ const response = await this.bridge.postMessage({ type: 'connect' });
2979
+ if (response !== undefined) {
2980
+ const { origin, data } = response;
2981
+ this.bridge.setOrigin(origin);
2982
+ this.data = data;
2983
+ this.updateTheme(data?.theme);
2984
+ this.isConnected = true;
2985
+ }
2982
2986
  this.resizeTracker = new ResizeTracker(this.bridge);
2983
- this.isConnected = true;
2984
2987
  }
2985
2988
  /**
2986
2989
  * The ID of the Foundry app this UI extension belongs to.