Skip to content

Still problems with ternary operators in arrays. #853

Open
@koskinpark

Description

@koskinpark

twig.js:^1.15.4

{% set classes = [ 'a-button', modifier ? modifier, ] %}

This returns now
{ classes: [ 0: undefined ] }

Normally, if modifier is not exist, we should return only ['a-button']. Or if it's exist -> it should return ['a-button', 'some-modifier-value'], or even ['a-button', ['some-modifier-value-1', 'some-modifier-value-2']]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions