3

I'm building a component that has a list of a custom object. When user does something specific on this component, some background work is done so that each item on this list can receive some attributes of country codes, like us for USA and ge for Germany.

I tried to save a component with the following markup, and got an error instead:

[ERROR]: expecting an identifier, found 'ge' at column 6 of expression: item.ge != undefined: Source

My code is as follows:

...
<li>
  <button class="slds-button slds-button_neutral">
    <span class="slds-m-right--small">
      <div>
        <aura:if isTrue="{!item.ge != undefined}">
          {!item.ge}
          <aura:set attribute="else">
            0
          </aura:set>
        </aura:if>
      </div>
    </span>
    <img src="{!$Resource.famfamfamflagpack + '/png/de.png'}"></img>
  </button>
</li>
...

And there are more elements on this HTML List, that have the same markup, but with different country codes, and I can only save when ge isn't on the list.

Is this a bug? For now I guess my best workaround is to use de instead, which is fine by me. But it's really weird not to be able to save the component because of an attribute.

1
  • can you share the beginning of the markup - to see how item is defined Commented May 16, 2017 at 6:21

1 Answer 1

3

Sounds like a bug. I'll ask around. For reference, ge is a synonym for ">=" (greater-or-equal-to), as noted here, which is probably why it isn't compiling correctly.

1
  • Confirming: this error happens when trying to save the component with the values specified on that table. Commented May 16, 2017 at 19:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .