Skip to content

useTemplateRef behaves differently in prod mode and dev mode #11816

@linzhe141

Description

@linzhe141

Vue version

3.5.1

Link to minimal reproduction

https://play.vuejs.org/#__PROD__eNp9UV1Lw0AQ/CvLvcRCTKnVl5oWVApW/KL28UBCuompl7vjPmKk5r+7SWwtIs1D2LuZnZ3Z27IrraPKI5uw2Kam0A4sOq9BJDKfcuYsZzMui1Ir42ALBrMQvMUVllokDpeYQQOZUSUEJBNccinQQV3XMP3Di29XD/cLqb2bCyxROvgC6YWYnQSfwYAaUyWtEhgJlZ8EpLD/gpB+g57goLQ5aQej8dko4DIe9rbJJB3czzg6AcRFOwyq01KtUVAY6uSsjUA1KVI9JGI8POhiIUWmOVmRRxurJO1l22pxlqpSFwLNk3YF+eBsAh3SYokQ6uOuu3PGY7i7T98wff/nfmNp+ISKZ4MWTYWc7TGXmBxdD89fHrGmeg9SEi+IfQRcIi3Rtx572rWXa7J9wOvcLroXLWS+svPaobS7UK3Rltl0fM7oVW+ORP+1O47Ouz4uG9ria4Wm1aQFjqOLaMSab0YKzvM=

Steps to reproduce

dev mode

image

swtich to prod mode

image

What is expected?

useTemplateRef should behave consistently in both prod and dev modes, and should always be null.

What is actually happening?

useTemplateRef behaves differently in prod mode and dev mode

System Info

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions