From 6bee8ad678c5a6ffe0ea996d88a85b05c0025d14 Mon Sep 17 00:00:00 2001 From: Rebecca Mahany-Horton Date: Wed, 24 Jul 2024 13:30:01 -0400 Subject: [PATCH] [Chrome IndexedDB] Support deserializing string arrays (#1793) --- ee/indexeddb/values.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ee/indexeddb/values.go b/ee/indexeddb/values.go index 2540de92b..b65618717 100644 --- a/ee/indexeddb/values.go +++ b/ee/indexeddb/values.go @@ -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)) }