@usermaven/nextjs 1.3.1 → 1.3.3
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/lib/index.es.js +8 -5
- package/package.json +1 -1
package/lib/index.es.js
CHANGED
|
@@ -790,10 +790,13 @@ function _copyAndTruncateStrings(object, maxStringLength) {
|
|
|
790
790
|
}
|
|
791
791
|
// Function to find the closest link element
|
|
792
792
|
function _findClosestLink(element) {
|
|
793
|
-
while (element && element.tagName
|
|
793
|
+
while (element && element.tagName) {
|
|
794
|
+
if (element.tagName.toLowerCase() == 'a') {
|
|
795
|
+
return element;
|
|
796
|
+
}
|
|
794
797
|
element = element.parentNode;
|
|
795
798
|
}
|
|
796
|
-
return
|
|
799
|
+
return null;
|
|
797
800
|
}
|
|
798
801
|
|
|
799
802
|
/*
|
|
@@ -1406,8 +1409,8 @@ _safewrap_instance_methods(autocapture);
|
|
|
1406
1409
|
|
|
1407
1410
|
var VERSION_INFO = {
|
|
1408
1411
|
env: 'production',
|
|
1409
|
-
date: '2024-02-
|
|
1410
|
-
version: '1.3.
|
|
1412
|
+
date: '2024-02-28T06:06:37.148Z',
|
|
1413
|
+
version: '1.3.3'
|
|
1411
1414
|
};
|
|
1412
1415
|
var USERMAVEN_VERSION = VERSION_INFO.version + "/" + VERSION_INFO.env + "@" + VERSION_INFO.date;
|
|
1413
1416
|
var MAX_AGE_TEN_YEARS = 31622400 * 10;
|
|
@@ -2316,7 +2319,7 @@ var UsermavenClientImpl = /** @class */ (function () {
|
|
|
2316
2319
|
var target = _findClosestLink(event.target);
|
|
2317
2320
|
if (target) {
|
|
2318
2321
|
// Check if the link is pointing to a different domain
|
|
2319
|
-
var href = target.getAttribute('href');
|
|
2322
|
+
var href = (target === null || target === void 0 ? void 0 : target.hasAttribute('href')) ? target === null || target === void 0 ? void 0 : target.getAttribute('href') : '';
|
|
2320
2323
|
if (href && href.startsWith('http')) {
|
|
2321
2324
|
var url = new URL(href);
|
|
2322
2325
|
var cookie = getCookie(cookieName);
|