If a document loads after game:BindToClose it won't be closed unless the user is closes it sometime after manually (for example PlayerRemoving).
The question is, how should it stop the loading?
Resolve the load promise with nil instead of a document?
Reject the load promise?
Infinitely yield the load promise?
ProfileService just returns nil from ProfileStore:LoadProfileAsync, however, I think infinitely yielding is the best option. This is because the other 2 solutions could cause user code to error. This shouldn't result in an error because it's not a bug. It would be unfortunate if a user saw an error and was worried about it.
If a document loads after
game:BindToClose
it won't be closed unless the user is closes it sometime after manually (for examplePlayerRemoving
).The question is, how should it stop the loading?
nil
instead of a document?ProfileService just returns
nil
fromProfileStore:LoadProfileAsync
, however, I think infinitely yielding is the best option. This is because the other 2 solutions could cause user code to error. This shouldn't result in an error because it's not a bug. It would be unfortunate if a user saw an error and was worried about it.