Commit 800802a8e83569e3d533238eba9e7df2f4d77a6a
fix crash when rendering empty post
Matt McKegg committed on 12/11/2017, 12:54:27 AMParent: 7b40e72587b4ad66d057d1dd84a907c403582692
Files changed
lib/expander-hook.js | changed |
lib/expander-hook.js | ||
---|---|---|
@@ -18,9 +18,9 @@ | ||
18 | 18 … | |
19 | 19 … | function handleEvent (ev) { |
20 | 20 … | var { needsExpand, element } = this |
21 | 21 … | if (!needsExpand()) { |
22 | - if (element.firstElementChild.clientHeight > element.clientHeight) { | |
22 … | + if (element.firstElementChild && element.firstElementChild.clientHeight > element.clientHeight) { | |
23 | 23 … | needsExpand.set(true) |
24 | 24 … | } |
25 | 25 … | } |
26 | 26 … | } |
Built with git-ssb-web