Skip to content

Commit

Permalink
Implement changes on snippet block extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
xeho91 committed Aug 12, 2024
1 parent cfd33cb commit ba74e9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parser/extract/svelte/snippet-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function findStoryAttributeChildrenSnippetBlock(options: {

const { value } = children;

if (value === true || value[0].type === 'Text' || value[0].expression.type !== 'Identifier') {
if (value === true || value.type !== 'ExpressionTag' || value.expression.type !== 'Identifier') {
throw new InvalidStoryChildrenAttributeError({
component: component,
childrenAttribute: children,
Expand All @@ -50,7 +50,7 @@ export function findStoryAttributeChildrenSnippetBlock(options: {
}

return findSnippetBlockByName({
name: value[0].expression.name,
name: value.expression.name,
nodes: nodes,
});
}
Expand Down

0 comments on commit ba74e9a

Please sign in to comment.