mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-12 22:15:27 -04:00
fix: short circuit
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user