Skip to content

Commit e9c48bf

Browse files
fix: allow __ENABLE_HASH_DECODING__ to be true
1 parent bc8ff16 commit e9c48bf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/core/src/lazyLoad.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ export function lazyLoad<T extends HTMLImageElement>(
2828
cleanupFns.add(onResizeCleanup)
2929

3030
// Generate the blurry placeholder from a Blurhash or ThumbHash string if applicable
31-
// @ts-expect-error: Compile-time flag to exclude this code from the bundle
32-
if (typeof __ENABLE_HASH_DECODING__ === 'undefined' && hash) {
31+
if (
32+
// @ts-expect-error: Compile-time flag to exclude this code from the bundle
33+
(typeof __ENABLE_HASH_DECODING__ === 'undefined' || __ENABLE_HASH_DECODING__)
34+
&& hash
35+
) {
3336
const placeholder = createPlaceholderFromHash({
3437
image,
3538
hash: typeof hash === 'string' ? hash : undefined,

0 commit comments

Comments
 (0)