Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Oct 16, 2023
1 parent 1873b6b commit 535ea8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/images/src/lib/category-api/image-format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export function isImageFormatSupported(mimeType: string): boolean {
function checkNodeImageFormatSupport(mimeType: string): boolean {
/** @deprecated Remove these in 4.0 and rely on polyfills to inject them */
const NODE_FORMAT_SUPPORT = ['image/png', 'image/jpeg', 'image/gif'];
// @ts-ignore
const {parseImageNode, imageFormatsNode = NODE_FORMAT_SUPPORT} = globalThis.loaders || {};
const parseImageNode = globalThis.loaders?.parseImageNode;
const imageFormatsNode = globalThis.loaders?.imageFormatsNode || NODE_FORMAT_SUPPORT;
return Boolean(parseImageNode) && imageFormatsNode.includes(mimeType);
}

Expand Down

0 comments on commit 535ea8e

Please sign in to comment.