Skip to content

Commit 869331e

Browse files
committed
fix: catch error inside renderSummary
1 parent 09a7262 commit 869331e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mind-elixir",
3-
"version": "3.3.0",
3+
"version": "3.3.1",
44
"type": "module",
55
"description": "Mind elixir is a free open source mind map core.",
66
"keywords": [

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ MindElixir.DARK_THEME = DARK_THEME
128128
* @memberof MindElixir
129129
* @static
130130
*/
131-
MindElixir.version = '3.3.0'
131+
MindElixir.version = '3.3.1'
132132
/**
133133
* @function
134134
* @memberof MindElixir

src/summary.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,11 @@ export const unselectSummary = function (this: MindElixirInstance) {
215215
export const renderSummary = function (this: MindElixirInstance) {
216216
this.summarySvg.innerHTML = ''
217217
this.summaries.forEach(summary => {
218-
drawSummary(this, summary)
218+
try {
219+
drawSummary(this, summary)
220+
} catch (e) {
221+
console.warn('Node may not be expanded')
222+
}
219223
})
220224
this.nodes.insertAdjacentElement('beforeend', this.summarySvg)
221225
}

0 commit comments

Comments
 (0)