From 49c1b1e68dee8e11ddbb04b6fd29acb58f75a5e2 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Wed, 29 Jul 2026 21:38:50 +0700 Subject: [PATCH] fix(lib/utils/object): lazy properties shouldn't delete itself when loader errors --- lib/utils/src/object.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils/src/object.ts b/lib/utils/src/object.ts index 7366f30..1dd8289 100644 --- a/lib/utils/src/object.ts +++ b/lib/utils/src/object.ts @@ -137,8 +137,9 @@ function lazyPropDesc( return { configurable: true, get(this: T) { + const val = loader() delete this[key] - return (this[key] = loader()) + return (this[key] = val) }, } }