Skip to content

Fix console error on empty localStorage value

Simon Knox requested to merge psi-boards-error into master

What does this MR do?

  1. fix a console error due to JSON.parse(''). Change it to parseBoolean (which is false for empty string).
  2. Also converts the JS component to a real vue component

I was getting console error locally because I somehow had empty string stored for the relevant localStorage value. Not sure how this actually can happen in app but 🤷

To reproduce (on master), run localStorage.setItem('gl-show-board-labels', ''); then load boards page.

Edited by Simon Knox

Merge request reports

Loading