This commit is contained in:
2026-03-15 12:22:42 +01:00
parent cd99275933
commit 311ba5e7f3
558 changed files with 55182 additions and 22981 deletions

View File

@@ -82,11 +82,7 @@ function getErrorCause(throwStatement) {
}
const causeProperties = errorOptions.properties.filter(
prop =>
prop.type === "Property" &&
prop.key.type === "Identifier" &&
prop.key.name === "cause" &&
!prop.computed, // It is hard to accurately identify the value of computed props
prop => astUtils.getStaticPropertyName(prop) === "cause",
);
const causeProperty = causeProperties.at(-1);