🐛(frontend) fix className filter in file preview

The predicate in the preview close branch was (className) =>
className !== className, which compared the lambda parameter to
itself and therefore never matched, leaving stale class names on the
preview when the PDF thumbnail sidebar was closed. Rename the inner
parameter so the filter compares against the outer className as
intended.
This commit is contained in:
Nathan Vasse
2026-04-14 15:10:48 +02:00
parent ab0d1897a7
commit 6b0ff1a0d1

View File

@@ -214,7 +214,7 @@ export const FilePreview = ({
}, OPEN_DELAY);
} else {
setClassNames((prev) => {
return prev.filter((className) => className !== className);
return prev.filter((className_) => className_ !== className);
});
}