fix(collapse): handling when the content has height zero

Fixes #2836