From 5199f2bb6ab063ffc80600542da5148b1d8cdd53 Mon Sep 17 00:00:00 2001 From: thislight Date: Sun, 24 Nov 2024 16:00:56 +0800 Subject: [PATCH] Masonry: fix typo --- .env | 2 +- src/overrides.d.ts | 2 +- src/platform/Masonry.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env b/.env index b5ff8ea..e36e49c 100644 --- a/.env +++ b/.env @@ -2,4 +2,4 @@ DEV_SERVER_HTTPS_CERT_BASE= DEV_SERVER_HTTPS_CERT_PASS= DEV_LOCATOR_EDITOR=vscode VITE_DEVTOOLS_OVERLAY=true -VITE_PLATFROM_MASONRY_ALWAYS_COMPAT= \ No newline at end of file +VITE_PLATFORM_MASONRY_ALWAYS_COMPAT= \ No newline at end of file diff --git a/src/overrides.d.ts b/src/overrides.d.ts index e8db98c..46a3af6 100644 --- a/src/overrides.d.ts +++ b/src/overrides.d.ts @@ -14,7 +14,7 @@ interface ImportMetaEnv { /** * Always use compatible version of Masonry. */ - readonly VITE_PLATFROM_MASONRY_ALWAYS_COMPAT?: string + readonly VITE_PLATFORM_MASONRY_ALWAYS_COMPAT?: string } interface ImportMeta { diff --git a/src/platform/Masonry.tsx b/src/platform/Masonry.tsx index bd461b9..8530783 100644 --- a/src/platform/Masonry.tsx +++ b/src/platform/Masonry.tsx @@ -80,11 +80,11 @@ const supportsCSSMasonryLayout = /* @__PURE__ */ CSS.supports( console.debug("supports css masonry layout", supportsCSSMasonryLayout); -const useNativeImpl = import.meta.env.VITE_PLATFROM_MASONRY_ALWAYS_COMPAT +const useNativeImpl = import.meta.env.VITE_PLATFORM_MASONRY_ALWAYS_COMPAT ? false : supportsCSSMasonryLayout; -if (import.meta.env.VITE_PLATFROM_MASONRY_ALWAYS_COMPAT) { +if (import.meta.env.VITE_PLATFORM_MASONRY_ALWAYS_COMPAT) { console.warn( "Masonry is in compat mode because VITE_PLATFORM_MASONRY_ALWAYS_COMPAT is enabled", );