@sentry/replay 11.0.0-alpha.0 → 11.0.0-alpha.1

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.
@@ -7673,12 +7673,15 @@ class ReplayContainer {
7673
7673
  getCurrentRoute() {
7674
7674
  const lastActiveSpan = this.lastActiveSpan || core.getActiveSpan();
7675
7675
  const lastRootSpan = lastActiveSpan && core.getRootSpan(lastActiveSpan);
7676
- const attributes = lastRootSpan && core.spanToJSON(lastRootSpan).data || {};
7677
- const source = attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
7678
- if (!lastRootSpan || !source || !["route", "custom"].includes(source)) {
7676
+ if (!lastRootSpan) {
7679
7677
  return void 0;
7680
7678
  }
7681
- return core.spanToJSON(lastRootSpan).description;
7679
+ const spanJson = core.spanToJSON(lastRootSpan);
7680
+ const source = spanJson.attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
7681
+ if (!source || !["route", "custom"].includes(source)) {
7682
+ return void 0;
7683
+ }
7684
+ return spanJson.name;
7682
7685
  }
7683
7686
  /**
7684
7687
  * Initialize and start all listeners to varying events (DOM,