nuxt-error-tracker 0.1.14 → 0.1.16
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/module.json +1 -1
- package/dist/runtime/plugin.client.js +10 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -116,7 +116,16 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
116
116
|
(event) => capture(event.reason, "promise")
|
|
117
117
|
);
|
|
118
118
|
const formatDataAttrs = (el) => {
|
|
119
|
-
|
|
119
|
+
let node = el;
|
|
120
|
+
let dataset;
|
|
121
|
+
for (let depth = 0; node && depth < 5; depth++) {
|
|
122
|
+
const ds = node.dataset;
|
|
123
|
+
if (ds && Object.keys(ds).length > 0) {
|
|
124
|
+
dataset = ds;
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
node = node.parentElement;
|
|
128
|
+
}
|
|
120
129
|
if (!dataset) return "";
|
|
121
130
|
return Object.entries(dataset).slice(0, 5).map(
|
|
122
131
|
([k, v]) => `data-${k.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`)}=${(v ?? "").slice(0, 40)}`
|