Quenty / NevermoreEngine

ModuleScript loader with reusable and easy unified server-client modules for faster game development on Roblox
https://quenty.github.io/NevermoreEngine/
MIT License
411 stars 124 forks source link

fix: DataStoreStage doesn't delete keys when overwritten with a table #459

Open OttoHatt opened 5 months ago

OttoHatt commented 5 months ago

I don't understand this module very well! Here's an attempt. I think merging keys from _saveDataSnapshot is overzealous, so maybe take a look at that..

The bug is: if data in _baseDataSnapshot is a table, and we overwrite with a table missing some of those keys, it won't delete that key when saving. It'll be left intact with some outdated value.