diff --git a/js/modules/k6/data/share.go b/js/modules/k6/data/share.go index 828726cc38f..2d8345a0234 100644 --- a/js/modules/k6/data/share.go +++ b/js/modules/k6/data/share.go @@ -75,7 +75,7 @@ func (s wrappedSharedArray) deepFreeze(rt *goja.Runtime, val goja.Value) error { if o == nil { return nil } - for _, key := range o.Keys() { + for _, key := range o.Prototype().Keys() { prop := o.Get(key) if prop != nil { // isFrozen returns true for all non objects so it we don't need to check that