Fix loading on older browsers (#397)

This commit is contained in:
Nitan Alexandru Marcel 2022-03-18 03:36:48 +00:00 committed by GitHub
parent 13248962af
commit a2655ee6a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -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);