Add proper null check for task item rendering
What does this MR do and why?
Fix an error when rendering issues with empty description. this.$el.querySelectorAll
is undefined`
We previously only checked for this.$el
, but when description is empty it is still truthy (it returns an empty HTML comment as a string). So we were running renderTaskActions
, then called String.querySelectorAll
, which errored.
Moved null check into the function, and tested on the function itself so we know we've got ourselves a node
Testing
- Enable
work_items
feature flag - Load an issue with empty description
- Check no console errors
Edited by Simon Knox