mirror of
https://github.com/suitenumerique/drive.git
synced 2026-04-25 17:15:19 +02:00
🐛(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:
@@ -214,7 +214,7 @@ export const FilePreview = ({
|
||||
}, OPEN_DELAY);
|
||||
} else {
|
||||
setClassNames((prev) => {
|
||||
return prev.filter((className) => className !== className);
|
||||
return prev.filter((className_) => className_ !== className);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user