Skip to content

Commit

Permalink
fix(InputMenu/SelectMenu): regex breaks build
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Nov 5, 2024
1 parent 22da1a8 commit cb6f5f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/runtime/components/forms/InputMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ export default defineComponent({
})
function escapeRegExp(string: string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
return string.replace(/[.*+?^${}()|[\]\\]/g, match => `\\${match}`)
}
const filteredOptions = computed(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/forms/SelectMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ export default defineComponent({
})
function escapeRegExp(string: string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
return string.replace(/[.*+?^${}()|[\]\\]/g, match => `\\${match}`)
}
function accessor<T extends Record<string, any>>(obj: T, key: string) {
Expand Down

0 comments on commit cb6f5f2

Please sign in to comment.