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

[Chrome IndexedDB] Support deserializing string arrays #1793

Merged
merged 3 commits into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ee/indexeddb/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ func deserializeSparseArray(ctx context.Context, slogger *slog.Logger, srcReader
return nil, fmt.Errorf("decoding object in array: %w", err)
}
arrItems[i] = string(obj) // cast to string so it's readable when marshalled again below
case tokenAsciiStr:
str, err := deserializeAsciiStr(srcReader)
if err != nil {
return nil, fmt.Errorf("decoding string in array: %w", err)
}
arrItems[i] = string(str) // cast to string so it's readable when marshalled again below
default:
return nil, fmt.Errorf("unimplemented array item type 0x%02x / `%s`", nextByte, string(nextByte))
}
Expand Down
Loading