Formatting buttons: update preview when all text is deleted
This commit is contained in:
parent
00b8e7a2ec
commit
11c6ffd946
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ marked.use({
|
|||
function markdown(first, second) {
|
||||
var input = document.getElementById(first);
|
||||
var dest = document.getElementById(second);
|
||||
if(dest && input && input.value.trim() !== ''){
|
||||
if(dest && input){
|
||||
for (var i = 0; i < dest.children.length; i++) {
|
||||
dest.removeChild(dest.children[i]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue