Skip to content

Strange behaviour when components lack a closing </script> tagΒ #1403

Open
@snoopdouglas

Description

@snoopdouglas

Version

15.3.0

Reproduction link

https://codesandbox.io/s/l7m0o5kwlq

Steps to reproduce

  • Create a component with an opening <script> tag, but without a closing </script> one.
  • Add a prop to that component, eg msg.
  • Mount that component with msg set.

What is expected?

I'd expect to see an error in compilation, eg. "no closing script tag".

What is actually happening?

No error is thrown, and props fail to register, causing a runtime error that the prop is not defined on the component, eg.:

Property or method "msg" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties

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