Skip to content

Commit 44d75cc

Browse files
committed
Merge pull request #122 from TooBug/patch-1
处理插入代码时出现undefined的情况
2 parents 0d940bc + 186e66c commit 44d75cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
}
136136

137137
function commandWrap(ctx, tag, value) {
138-
value = '<' + tag + '>' + value + '</' + tag + '>';
138+
value = '<' + tag + '>' + (value||'') + '</' + tag + '>';
139139
return commandOverall(ctx, 'insertHTML', value);
140140
}
141141

0 commit comments

Comments
 (0)