Fix null-safe username search in block list
This commit is contained in:
@@ -27,7 +27,7 @@ export default function BlockListPanel({
|
|||||||
if (!q) return blocks;
|
if (!q) return blocks;
|
||||||
return blocks.filter(
|
return blocks.filter(
|
||||||
(b) =>
|
(b) =>
|
||||||
b.username.toLowerCase().includes(q) ||
|
(b.username || '').toLowerCase().includes(q) ||
|
||||||
(b.display_name || '').toLowerCase().includes(q)
|
(b.display_name || '').toLowerCase().includes(q)
|
||||||
);
|
);
|
||||||
}, [blocks, search]);
|
}, [blocks, search]);
|
||||||
|
|||||||
Reference in New Issue
Block a user