Skip to content

Commit

Permalink
处理插入代码时出现undefined的情况
Browse files Browse the repository at this point in the history
双击某个地方选中一个单词,点击code,会出现undefined字样。不确定是否是意料中的行为,或者也有可能是前面没处理好导致undefined出现
  • Loading branch information
TooBug committed Nov 22, 2014
1 parent 0d940bc commit 186e66c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pen.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
}

function commandWrap(ctx, tag, value) {
value = '<' + tag + '>' + value + '</' + tag + '>';
value = '<' + tag + '>' + (value||'') + '</' + tag + '>';
return commandOverall(ctx, 'insertHTML', value);
}

Expand Down

0 comments on commit 186e66c

Please sign in to comment.