diff --git a/static/js/jsmind.js b/static/js/jsmind.js
index 821d05c..8340347 100644
--- a/static/js/jsmind.js
+++ b/static/js/jsmind.js
@@ -1516,9 +1516,9 @@
auto_height_node_before_update: function (node) {
const topic = node.topic
if (!!topic) {
- const lines = topic.split('\n').length
- const view_data = node._data.view;
- const element = view_data.element;
+ const lines = topic.includes('
') ? topic.split('
').length : topic.split('\n').length
+ const view_data = node._data.view
+ const element = view_data.element
const height = (lines * 12 + 14)
element.style.height = `${height}px`
}