Skip to main content
3 of 3
Added a more general recommendation
Felix van Hove
  • 3.6k
  • 6
  • 24
  • 33

if(this.pageFlattenedData && this.pageFlattenedData.lenght > 0)

This should be length. this.showMessage never gets true.

If I were you, I'd move the methods below @wire to a separate Javascript module. A separate module can be tested much more easily, because unit tests can directly test individual methods. E.g. above problem would almost for sure have come to light writing a unit test for showMessageOrTable().

Felix van Hove
  • 3.6k
  • 6
  • 24
  • 33