Skip to content

Spread on readonly object returns empty object in Safari 12 & 13 #7389

Open
@carl-underwood

Description

@carl-underwood

Vue version

3.2.45

Link to minimal reproduction

https://sfc.vuejs.org/#eNp9T8lOwzAQ/ZXBlxSpsSWWSwhVuXHjyMWXNpmWlHjR2ClClv8du2lQKFJv85Z5byawF2v5cUBWsdo11FkPDv1gV1J3yhryEIBw0xrdfy/TtIMIOzIKirRUSC11Y7TzYLYHeM76IoBy+wqKV+x7A++G+vamgHj7NFmnuLfzyogWKSF7ajGekQ5IwKOy/cZjQgB1Y1pchQCBc57sEWKstzQxs9yTIk72nPibwpZs/KpUG8sPzuj0d8jZ8iw4ySo4MZlLP2Ys2Yf31lVCDNp+7nljlFgnTdCgfaewbI1a3/M7/vAo2s75Oc/RqXJL5sshpUbJlrNwkcgjUkmoWySkq2UX3j+FF9q/0twZpY4s/gDdKK1G

Steps to reproduce

Note that in e.g. Safari 14, the text is rendered as:

{ "msg": "Hello World!" }
{ "msg": "Hello World!" }

While in Safari 12 & 13 it is rendered as:

{ "msg": "Hello World!" }
{}

What is expected?

That the text is rendered in Safari 12 & 13 as:

{ "msg": "Hello World!" }
{ "msg": "Hello World!" }

What is actually happening?

The spread of readonlyObj is returning {}.

System Info

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions