fix: short circuit
This commit is contained in:
parent
e82bb6c410
commit
e5ab6b3c93
1 changed files with 3 additions and 4 deletions
|
|
@ -89,12 +89,11 @@ export function PatternsTab({ context }) {
|
|||
const viewingPatternID = viewingPatternData?.id;
|
||||
|
||||
const visiblePatterns = useMemo(() => {
|
||||
if (!search) {
|
||||
return userPatterns;
|
||||
}
|
||||
return Object.fromEntries(
|
||||
Object.entries(userPatterns).filter(([_key, pattern]) => {
|
||||
if (!search) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const meta = getMetadata(pattern.code);
|
||||
|
||||
// Search for specific meta keys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue