1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-01-09 10:07:17 +02:00

set map size to the shallowCopy

This commit is contained in:
Gani Georgiev 2022-12-12 15:58:56 +02:00
parent 21f442293f
commit 54c52f696c

View File

@ -426,7 +426,7 @@ func (m *Record) getNormalizeDataValueForDB(key string) any {
// shallowCopy shallow copy data into a new map.
func shallowCopy(data map[string]any) map[string]any {
result := map[string]any{}
result := make(map[string]any, len(data))
for k, v := range data {
result[k] = v