mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-22 18:24:21 +01:00
fix lazy loading
This commit is contained in:
@@ -4,6 +4,7 @@ export function lazy<T>(fn: () => T) {
|
||||
|
||||
return (): T => {
|
||||
if (loaded) return value as T
|
||||
loaded = true
|
||||
value = fn()
|
||||
return value as T
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user