0

I have a method in my vue js app.

 resetFilter: function() {
             $('.person').fadeIn(500);
             this.toggleDepartments;

           },

The error is "Block is redundant: no lone blocks:

How do I rewrite this in ES6 to fix the linting error?

TylerH
  • 20,799
  • 66
  • 75
  • 101
LeBlaireau
  • 17,133
  • 33
  • 112
  • 192
  • 1
    this line `this.toggleDepartments` does nothing, did you miss some call() parenthesis ? – BiAiB Nov 10 '17 at 15:56
  • No that's not it but thanks for your reply as it did get me to the right answer. A large block of the code is wrapped in { } brackets to solve a scope issue. – LeBlaireau Nov 10 '17 at 16:03
  • @BiAiB is say (as well as the error) `this.toggleDepartments;` line is redundant, it will do nothing unless it's a computed prop... is it? – samayo Nov 10 '17 at 16:07
  • A get accessor should not have a side effect, it is very confusing. – Aluan Haddad Nov 12 '17 at 04:16

0 Answers0