mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-26 01:40:34 +01:00
fix(InputMenu/SelectMenu): regex breaks build
This commit is contained in:
@@ -402,7 +402,7 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
|
|
||||||
function escapeRegExp(string: string) {
|
function escapeRegExp(string: string) {
|
||||||
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
return string.replace(/[.*+?^${}()|[\]\\]/g, match => `\\${match}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const filteredOptions = computed(() => {
|
const filteredOptions = computed(() => {
|
||||||
|
|||||||
@@ -486,7 +486,7 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
|
|
||||||
function escapeRegExp(string: string) {
|
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) {
|
function accessor<T extends Record<string, any>>(obj: T, key: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user