UpdateAsync formats old data unlike what was inserted from the new data

Reproduction Steps
I’ve attached a repro place that guarantees this bug to happen. There is only a server script in ServerScriptService which has the proper code and data format to execute this bug.

  1. Publish the place under your account
  2. Load into studio, enable studio access to API services
  3. Run via Server (F8)
  4. Output should provide necessary info involving the bug. “OLD DATA” will show what UpdateAsync provided as the read value, “CORRECT DATA” will show what it’s supposed to look like.

I am currently using Windows 10.

Expected Behavior
I would expect the “old value” within the UpdateAsync function to be the same value as the one put into DataStore, or otherwise throw an error if incompatible in the first place.

Actual Behavior
When UpdateAsync tries to update it will provide the read value. As long as the array within this data is not naturally numeric (1, 2, …n), the indices will be converted to strings instead. You can see this happening in the repro place.

Workaround
Currently working around this by reverting the string indices within the table back to numbers upon the “old data” being assigned.

Issue Area: Engine
Issue Type: Other
Impact: Moderate
Frequency: Constantly
A private message is associated with this bug report

1 Like

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

1 Like

Hi there, we have updated our documentation for those behaviors, please let us know if you have additional questions. Thank you!

1 Like