diff --git a/src/compiler/parse/state/fragment.ts b/src/compiler/parse/state/fragment.ts index b072ede0c9..aa9bab77ad 100644 --- a/src/compiler/parse/state/fragment.ts +++ b/src/compiler/parse/state/fragment.ts @@ -3,8 +3,11 @@ import mustache from './mustache'; import tag from './tag'; import text from './text'; -export default (parser: Parser) => - [ - { match: '<', fragment: tag }, - { match: '{', fragment: mustache } - ].find(({ match }) => parser.match(match))?.fragment ?? text; +export default function fragment(parser: Parser) { + return ( + [ + { match: '<', fragment: tag }, + { match: '{', fragment: mustache } + ].find(({ match }) => parser.match(match))?.fragment ?? text + ); +}