Skip to content

[BUG] TypeError: Cannot read property '1' of null #23

@jaygel179

Description

@jaygel179

I have this component

<p></p>

<style>
</style>

<script>
  // Ractive.load()
  // any comment
</script>

and parse the source file using rcu.parse() but got this error..

TypeError: Cannot read property '1' of null
      at tokenClosesExpression (node_modules/rcu/dist/rcu.umd.js:491:38)
      at base (node_modules/rcu/dist/rcu.umd.js:350:117)
      at find (node_modules/rcu/dist/rcu.umd.js:482:13)
      at match (node_modules/rcu/dist/rcu.umd.js:581:16)
      at Object.parse (node_modules/rcu/dist/rcu.umd.js:732:5)
      at test/sample.js:16:30
      at lib$es6$promise$$internal$$tryCatch (node_modules/es6-promise/dist/es6-promise.js:331:16)
      at lib$es6$promise$$internal$$invokeCallback (node_modules/es6-promise/dist/es6-promise.js:343:17)
      at lib$es6$promise$$internal$$publish (node_modules/es6-promise/dist/es6-promise.js:314:11)
      at Object.lib$es6$promise$asap$$flush [as _onImmediate] (node_modules/es6-promise/dist/es6-promise.js:125:9)

If i will remove the comment (// any comment) below // Ractive.load() comment, i wont get the error.

<p></p>

<style>
</style>

<script>
  // Ractive.load()
</script>

I tried different comments.. a full component with CSS JS and HTML and none of that matters as long as there's no comment below // Ractive.load()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions