joeyjiron06 / intellij-auto-align

A code formatter intellij plugin
0 stars 2 forks source link

switch case causes internal crash of webstrom #5

Closed joeyjiron06 closed 8 years ago

joeyjiron06 commented 8 years ago

I get a string index out of bounds exception then trying to auto-align this probably because the colon is the last item on the line :

switch (this.get('reqPayload.status')) {
      case STATUS.NOT_LOADED:
        return null;
      case STATUS.LOADING:
        return 'Loading...';
      case STATUS.LOAD_SUCCESS:
        return this.get('reqPayload.value');
      case STATUS.LOAD_ERROR:
        return this.get('reqPayload.error');
      default:
        return null;
    }
joeyjiron06 commented 8 years ago

fixed in 1.2