@carbonorm/carbonreact 4.0.3 → 4.0.5

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.esm.js CHANGED
@@ -4364,8 +4364,7 @@ class CarbonReact extends Component {
4364
4364
  target;
4365
4365
  static _instance;
4366
4366
  static get instance() {
4367
- // Here `this` refers to the calling class in static context
4368
- return this._instance;
4367
+ return this;
4369
4368
  }
4370
4369
  static set instance(instance) {
4371
4370
  this._instance = instance;
@@ -4433,11 +4432,11 @@ class CarbonReact extends Component {
4433
4432
  console.log('%c color (' + colorHex + ')', 'color: ' + colorHex);
4434
4433
  const nest = jsxRuntime_1(Nest, { position: 'fixed', backgroundColor: '', color: hexToRgb(colorHex), count: 100 });
4435
4434
  if (this.state.backendThrowable.length > 0) {
4436
- return jsxRuntime_2(jsxRuntime_3, { children: [nest, jsxRuntime_1(BackendThrowable, { instance: CarbonReact.instance })] });
4435
+ return jsxRuntime_2(jsxRuntime_3, { children: [nest, jsxRuntime_1(BackendThrowable, { instance: this })] });
4437
4436
  }
4438
4437
  const Context = this.context.Provider;
4439
4438
  return jsxRuntime_2(jsxRuntime_3, { children: [jsxRuntime_1(GlobalHistory, {}), this.props.websocket &&
4440
- jsxRuntime_1(CarbonWebSocket, { ...(true === this.props.websocket ? {} : this.props.websocket), instance: CarbonReact.instance }), jsxRuntime_1(Context, { value: this.state, children: this.props.children }), jsxRuntime_1(ToastContainer, {})] });
4439
+ jsxRuntime_1(CarbonWebSocket, { ...(false !== this.props.websocket ? this.props.websocket : {}), instance: this }), jsxRuntime_1(Context, { value: this.state, children: this.props.children }), jsxRuntime_1(ToastContainer, {})] });
4441
4440
  }
4442
4441
  }
4443
4442