-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Type: BugThe issue has indentified a bugThe issue has indentified a bug
Description
Originally reported - adonisjs/view#16
When rendering, a state with youtubeUrl variable is passed to the template. I can render it:
{{ youtubeUrl }}
But, if I try usse it like JS variable then I get fail
{{ new URL(youtubeUrl).pathname }} // 500: youtubeUrl is not defined
@set('obj', new URL(youtubeUrl)) // 500: youtubeUrl is not defined
As a workaround, I have to reassign this variable to itself or another variable
@set('youtubeUrl', youtubeUrl)
{{ new URL(youtubeUrl).pathname }} // ok
@set('obj', new URL(youtubeUrl)) // ok
Package version
"@adonisjs/core": "5.7.5",
"@adonisjs/view": "6.1.3",
Node.js and npm version
8.3.1
Metadata
Metadata
Assignees
Labels
Type: BugThe issue has indentified a bugThe issue has indentified a bug