Remove helpers not available in js

This commit is contained in:
Adria Navarro 2024-01-30 17:37:09 +01:00
parent 82b4af1436
commit d1712bda52
2 changed files with 5 additions and 3 deletions

View File

@ -47,9 +47,10 @@
}) })
$: filteredHelpers = helpers?.filter(helper => { $: filteredHelpers = helpers?.filter(helper => {
return ( return (
!search || (!search ||
helper.label.match(searchRgx) || helper.label.match(searchRgx) ||
helper.description.match(searchRgx) helper.description.match(searchRgx)) &&
(mode.name !== "javascript" || !helper.requiresBlock)
) )
}) })

View File

@ -11,6 +11,7 @@ export function handlebarsCompletions() {
label: helperName, label: helperName,
displayText: helperName, displayText: helperName,
description: helperConfig.description, description: helperConfig.description,
requiresBlock: helperConfig.requiresBlock,
})) }))
) )
} }