allow blank

This commit is contained in:
2023-09-02 21:09:36 +10:00
parent 83c0ae5841
commit 143f002ead

View File

@@ -35,6 +35,10 @@ export const mimeMatches = (
mimeExpected: string,
mimeToCheck: string,
): boolean => {
if (mimeExpected.length == 0) {
mimeExpected = "*";
}
const escapedExpectation = mimeExpected.replace(
/[.*+?^${}()|[\]\\]/g,
"\\$&",