Refactor editor architecture
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -64,10 +64,7 @@ const guessMimeType = async (
|
||||
uri: string,
|
||||
hint?: string | null,
|
||||
): Promise<string | undefined> => {
|
||||
if (hint) {
|
||||
if (allowedMimeTypes.includes(hint)) return hint;
|
||||
if (!hint.startsWith('image/')) return undefined;
|
||||
}
|
||||
if (hint && allowedMimeTypes.includes(hint)) return hint;
|
||||
|
||||
const guessedMimeType = guessMimeTypeFromExtension(uri);
|
||||
if (guessedMimeType) return guessedMimeType;
|
||||
|
Reference in New Issue
Block a user