Fix loading on older browsers (#397)
This commit is contained in:
committed by
GitHub
parent
13248962af
commit
a2655ee6a5
@@ -88,7 +88,7 @@ function SpaceAddExistingContent({ roomId }) {
|
||||
};
|
||||
|
||||
const handleSearch = (ev) => {
|
||||
const term = ev.target.value.toLocaleLowerCase().replaceAll(' ', '');
|
||||
const term = ev.target.value.toLocaleLowerCase().replace(/\s/g, '');
|
||||
if (term === '') {
|
||||
setSearchIds(null);
|
||||
return;
|
||||
@@ -100,7 +100,7 @@ function SpaceAddExistingContent({ roomId }) {
|
||||
if (!name) return false;
|
||||
name = name.normalize('NFKC')
|
||||
.toLocaleLowerCase()
|
||||
.replaceAll(' ', '');
|
||||
.replace(/\s/g, '');
|
||||
return name.includes(term);
|
||||
});
|
||||
setSearchIds(searchedIds);
|
||||
|
||||
Reference in New Issue
Block a user