diff --git a/app/assets/javascripts/discourse/widgets/topic-map.js.es6 b/app/assets/javascripts/discourse/widgets/topic-map.js.es6 index 16c78eaa2..420e45702 100644 --- a/app/assets/javascripts/discourse/widgets/topic-map.js.es6 +++ b/app/assets/javascripts/discourse/widgets/topic-map.js.es6 @@ -186,7 +186,7 @@ export default createWidget('topic-map', { buildKey: attrs => `topic-map-${attrs.id}`, defaultState(attrs) { - return { collapsed: attrs.topicPostsCount < 50 }; + return { collapsed: (attrs.topicPostsCount || 0) < 50 }; }, html(attrs, state) {