File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " mind-elixir" ,
3- "version" : " 0.19.6 " ,
3+ "version" : " 0.19.7 " ,
44 "description" : " Mind elixir is a free open source mind map core." ,
55 "main" : " dist/MindElixir.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -150,16 +150,16 @@ export default function(mind) {
150150 }
151151 tagInput . onchange = ( e :InputEvent & { target : HTMLInputElement } ) => {
152152 if ( ! mind . currentNode ) return
153- if ( e . target . value ) {
153+ if ( typeof e . target . value === 'string' ) {
154154 const newTags = e . target . value . split ( ',' )
155- mind . updateNodeTags ( mind . currentNode . nodeObj , newTags )
155+ mind . updateNodeTags ( mind . currentNode . nodeObj , newTags . filter ( tag => tag ) )
156156 }
157157 }
158158 iconInput . onchange = ( e :InputEvent & { target : HTMLInputElement } ) => {
159159 if ( ! mind . currentNode ) return
160- if ( e . target . value ) {
160+ if ( typeof e . target . value === 'string' ) {
161161 const newIcons = e . target . value . split ( ',' )
162- mind . updateNodeIcons ( mind . currentNode . nodeObj , newIcons )
162+ mind . updateNodeIcons ( mind . currentNode . nodeObj , newIcons . filter ( icon => icon ) )
163163 }
164164 }
165165 let state = 'open'
Original file line number Diff line number Diff line change @@ -45,15 +45,15 @@ export const shapeTpc = function(tpc: Topic, nodeObj: NodeObj) {
4545 linkContainer . href = nodeObj . hyperLink
4646 tpc . appendChild ( linkContainer )
4747 }
48- if ( nodeObj . icons ) {
48+ if ( nodeObj . icons && nodeObj . icons . length ) {
4949 const iconsContainer = $d . createElement ( 'span' )
5050 iconsContainer . className = 'icons'
5151 iconsContainer . innerHTML = nodeObj . icons
5252 . map ( icon => `<span>${ encodeHTML ( icon ) } </span>` )
5353 . join ( '' )
5454 tpc . appendChild ( iconsContainer )
5555 }
56- if ( nodeObj . tags ) {
56+ if ( nodeObj . tags && nodeObj . tags . length ) {
5757 const tagsContainer = $d . createElement ( 'div' )
5858 tagsContainer . className = 'tags'
5959 tagsContainer . innerHTML = nodeObj . tags
You can’t perform that action at this time.
0 commit comments