Skip to content

Commit

Permalink
[Chrome IndexedDB] Support deserializing string arrays (#1793)
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany authored Jul 24, 2024
1 parent ddb2181 commit 6bee8ad
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 6bee8ad

Please sign in to comment.