               if parentTokenIdx >=0 then tokenStack[parentTokenIdx].termsThisTagIdx = idxOfToken
               idxOfToken++
 
-          # Ternary operators
-          when TERNARY_IF , TERNARY_ELSE
+          # Ternary and conditional if/else operators
+          when TERNARY_IF , TERNARY_ELSE, JS_IF, JS_ELSE
             isFirstTagOfBlock = true
 
       # handle lines with no token on them

    @insertNlJsx = new InsertNlJsx(@editor)
    @autoJsx = atom.config.get('language-babel').autoIndentJSX
    # regex to search for tag open/close tag and close tag
    @JSXREGEXP = /(<)([$_A-Za-z](?:[$_.:\-A-Za-z0-9])*)|(\/>)|(<\/)([$_A-Za-z](?:[$._:\-A-Za-z0-9])*)(>)|(>)|({)|(})|(\?)|(:)/g
    @mouseUp = true
    @multipleCursorTrigger = 1
    @disposables = new CompositeDisposable()

    else if match[11]?
      if 'keyword.operator.ternary.js' is scope
        return TERNARY_ELSE
    else if match[12]?
      if 'keyword.control.conditional.js' is scope
        return JS_IF
    else if match[13]?
      if 'keyword.control.conditional.js' is scope
        return JS_ELSE
    return NO_TOKEN


