Skip to content

Last line of code doesn't execute in a U2 template #533

@adamvy-google

Description

@adamvy-google

Example:

CLASS({
package: 'foam.demos',
name: 'Test',
extends: 'foam.u2.View',
templates: [
function initE() {/*#U2

((console.log("foo");))

((console.log("bar");))
*/}
]
});

If you run this view, you only see "foo" in the console, "bar" is never outputted. Examining the generated code shows that console.log("bar"); isn't even included.

We should either support this case, or warn if it happens.

Metadata

Metadata

Assignees

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