Skip to content

Commit 4b42ae6

Browse files
committed
tweak
1 parent 578fbcd commit 4b42ae6

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/SvelteBoundary.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,20 @@ export function SvelteBoundary(node, context) {
1818

1919
for (const attribute of node.attributes) {
2020
if (
21-
attribute.type === 'Attribute' &&
22-
attribute.name === 'onerror' &&
23-
attribute.value !== true &&
24-
!Array.isArray(attribute.value)
21+
attribute.type !== 'Attribute' ||
22+
attribute.value === true ||
23+
Array.isArray(attribute.value)
2524
) {
25+
continue;
26+
}
27+
if (attribute.name === 'onerror') {
2628
onerror = /** @type {Expression} */ (
2729
context.visit(attribute.value.expression, context.state)
2830
);
31+
} else if (attribute.name === 'failed') {
32+
failed_param = /** @type {Expression} */ (
33+
context.visit(attribute.value.expression, context.state)
34+
);
2935
}
3036
}
3137

0 commit comments

Comments
 (0)