My condition is working, but i believe there is a more elegant and short way to write it:
if (this.filters.provider.length !== 1) { return true } else { if (this.filters.provider.includes('test')) { return false } return true }
return this.filters.provider.length !== 1 || !this.filters.provider.includes('test');
you can use a ternary operator like this:
return (this.filters.provider.length !== 1) ? true : this.filters.provider.includes('test') ? false : true;