close #350 catch error may caused by checkout feature
This commit is contained in:
@@ -977,10 +977,19 @@ export class Replayer {
|
|||||||
for (const attributeName in mutation.attributes) {
|
for (const attributeName in mutation.attributes) {
|
||||||
if (typeof attributeName === 'string') {
|
if (typeof attributeName === 'string') {
|
||||||
const value = mutation.attributes[attributeName];
|
const value = mutation.attributes[attributeName];
|
||||||
if (value !== null) {
|
try {
|
||||||
((target as Node) as Element).setAttribute(attributeName, value);
|
if (value !== null) {
|
||||||
} else {
|
((target as Node) as Element).setAttribute(attributeName, value);
|
||||||
((target as Node) as Element).removeAttribute(attributeName);
|
} else {
|
||||||
|
((target as Node) as Element).removeAttribute(attributeName);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
if (this.config.showWarning) {
|
||||||
|
console.warn(
|
||||||
|
'An error occurred may due to the checkout feature.',
|
||||||
|
error,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user