From 225e290206a6fd7d6da3866c03b0cf829451cbcd Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 13 Feb 2025 17:39:11 -0800 Subject: [PATCH] preface it on it existing --- reflex/compiler/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index 2e723c540..c66dfe304 100644 --- a/reflex/compiler/utils.py +++ b/reflex/compiler/utils.py @@ -523,7 +523,7 @@ def write_page(path: str | Path, code: str): """ path = Path(path) path_ops.mkdir(path.parent) - if path.read_text(encoding="utf-8") == code: + if path.exists() and path.read_text(encoding="utf-8") == code: return path.write_text(code, encoding="utf-8")