@thefittingroom/shop-ui 3.0.0-alpha-7 → 3.0.0-alpha-8

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/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * thefittingroom v3.0.0-alpha-7 (2025-04-18T19:07:37.264Z)
2
+ * thefittingroom v3.0.0-alpha-8 (2025-04-18T19:09:32.973Z)
3
3
  * Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
4
4
  */
5
5
  function loadImageRecursive(imageURL, imageURLs) {
@@ -28119,25 +28119,14 @@ class FittingRoom {
28119
28119
  async onTryOnClick(styleId, sizeId, shouldDisplay = true) {
28120
28120
  if (!this.vtoComponent)
28121
28121
  return console.error('VtoComponent is not initialized');
28122
- try {
28123
- const frames = await this.shop.tryOn(styleId, sizeId);
28124
- if (shouldDisplay) {
28125
- try {
28126
- this.vtoComponent.init();
28127
- this.vtoComponent.onNewFramesReady(frames);
28128
- }
28129
- catch (e) {
28130
- console.error('Error initializing VTO:', e);
28131
- this.tfrModal.onError(L.SomethingWentWrong);
28132
- }
28133
- }
28134
- }
28135
- catch (error) {
28136
- console.error('Error during try-on:', error);
28137
- if (error instanceof Error && error.name === 'TimeoutError') {
28138
- this.tfrModal.onError(L.GetVirtualTryOnFramesErrorText);
28122
+ const frames = await this.shop.tryOn(styleId, sizeId);
28123
+ if (shouldDisplay) {
28124
+ try {
28125
+ this.vtoComponent.init();
28126
+ this.vtoComponent.onNewFramesReady(frames);
28139
28127
  }
28140
- else {
28128
+ catch (e) {
28129
+ console.error('Error initializing VTO:', e);
28141
28130
  this.tfrModal.onError(L.SomethingWentWrong);
28142
28131
  }
28143
28132
  }