0👍
✅
Solution found:
change this line:
res = (this.fruit != null || this.fruit == '');
to this:
res = (this.fruit != null && this.fruit.length > 0);
Source:stackexchange.com