Skip to content

Commit

Permalink
#12 - Allow formatting in console.log - also allowing non string types.
Browse files Browse the repository at this point in the history
  • Loading branch information
Irene Ros committed Nov 5, 2011
1 parent 406f024 commit 5a3574f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion deck.codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,15 @@
if (output.html() !== "") {
output.append("<br />" + msg);
} else {
output.html(msg);

// in case the output is not a string or an html element,
// just stringify it.
try {
output.html(msg);
} catch(e) {
output.html(JSON.stringify(msg));
}

}
};

Expand Down

0 comments on commit 5a3574f

Please sign in to comment.