Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Add 'const' and 'let' to _complexIdentifiers array

    The following code generates a
    Uncaught SyntaxError: Invalid or unexpected token

    Code:
       
        let listGridObj = isc.DesignListGridMenuItem.getListGrid(target, this)
        listGridObj.setShowFilterEditor(!listGridObj.showFilterEditor)
    That is because it's seen as an isSimpleExpression == true in method _expressionToFunction.

    To combat that, I can add a semicolon after each line, but my linter shows it as warning/error (extra semicolon)

    An other solution would be if you add 'const' and 'let' to _complexIdentifiers array

    Code:
    isc.Func.addClassMethods({
    ...
        _complexIdentifiers : ["switch", "while", "if", "return", "for", "var"],
    ..

Working...
X