Skip to content

Commit

Permalink
fix: catch error inside renderSummary
Browse files Browse the repository at this point in the history
  • Loading branch information
SSShooter committed Nov 5, 2023
1 parent 09a7262 commit 869331e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "mind-elixir",
"version": "3.3.0",
"version": "3.3.1",
"type": "module",
"description": "Mind elixir is a free open source mind map core.",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -128,7 +128,7 @@ MindElixir.DARK_THEME = DARK_THEME
* @memberof MindElixir
* @static
*/
MindElixir.version = '3.3.0'
MindElixir.version = '3.3.1'
/**
* @function
* @memberof MindElixir
Expand Down
6 changes: 5 additions & 1 deletion src/summary.ts
Expand Up @@ -215,7 +215,11 @@ export const unselectSummary = function (this: MindElixirInstance) {
export const renderSummary = function (this: MindElixirInstance) {
this.summarySvg.innerHTML = ''
this.summaries.forEach(summary => {
drawSummary(this, summary)
try {
drawSummary(this, summary)
} catch (e) {
console.warn('Node may not be expanded')
}
})
this.nodes.insertAdjacentElement('beforeend', this.summarySvg)
}
Expand Down

0 comments on commit 869331e

Please sign in to comment.