If the contacts table happens to be empty the Contacts index page will not render because the empty collection is json_encode'd to an array and the Vue component is expecting the prop to be an object.
I found that chaining a whenEmpty after the transform fixes this issue, but it feels kind of dirty...
If the
contacts
table happens to be empty the Contacts index page will not render because the empty collection isjson_encode
'd to an array and the Vue component is expecting the prop to be an object.I found that chaining a
whenEmpty
after thetransform
fixes this issue, but it feels kind of dirty...Is there a better was to get to get the empty states for pages like this working?