Open lukebjerring opened 2 years ago
https://github.com/mobxjs/mobx-utils/blob/3a1ee03527950a44c5ce57007344a56a9b974c94/src/lazy-observable.ts#L45
Given that we're fine to omit the initial value fallback, current() can return undefined while the promise is unresolved. The code snippet example even compares current() === undefined.
current()
undefined
current() === undefined
This seems to be resolved in the latest version, it is now dependent on if you provide an initial value
https://github.com/mobxjs/mobx-utils/blob/3a1ee03527950a44c5ce57007344a56a9b974c94/src/lazy-observable.ts#L45
Given that we're fine to omit the initial value fallback,
current()
can returnundefined
while the promise is unresolved. The code snippet example even comparescurrent() === undefined
.