File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
packages/svelte/src/compiler/phases/3-transform/client/visitors Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff 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[] } */
You can’t perform that action at this time.
0 commit comments