Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lockAndLoad does not check if the DataStore request was successful #2

Open
anthony0br opened this issue Jul 23, 2024 · 0 comments
Open

Comments

@anthony0br
Copy link

https://github.com/ffrostfall/keyForm/blob/master/src/store/init.luau

lockAndLoad currently relies on a value successfullyLocked set during the transform function.

According to the Roblox documentation this transform function can be run any number of times, with the result discarded. The function running doesn't necessarily imply the data is successfully saved.

This means that in rare cases the method might silently fail to session lock a store.

successfullyLocked could be set to false at the top of the transform function and the result of the _updateAsync could be checked to ensure lockAndLoad always returns nil if setting the lock fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant