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