Skip to content

Commit 6ec4d6b

Browse files
committed
comments
1 parent d7dbccc commit 6ec4d6b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export function SvelteBoundary(node, context) {
3838
continue;
3939
}
4040

41+
// Skip non-attributes with a single value
4142
if (
4243
attribute.type !== 'Attribute' ||
4344
attribute.value === true ||
@@ -46,6 +47,7 @@ export function SvelteBoundary(node, context) {
4647
continue;
4748
}
4849

50+
// Currently we only support `onerror` and `failed` props
4951
if (attribute.name === 'onerror' || attribute.name === 'failed') {
5052
const value = /** @type {Expression} */ (
5153
context.visit(attribute.value.expression, context.state)
@@ -61,6 +63,7 @@ export function SvelteBoundary(node, context) {
6163
}
6264
}
6365

66+
// Capture the `failed` implicit snippet prop
6467
for (const child of node.fragment.nodes) {
6568
if (child.type === 'SnippetBlock' && child.expression.name === 'failed') {
6669
/** @type {Statement[]} */

0 commit comments

Comments
 (0)