Skip to content

Commit 5a3574f

Browse files
author
Irene Ros
committed
#12 - Allow formatting in console.log - also allowing non string types.
1 parent 406f024 commit 5a3574f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

deck.codemirror.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,15 @@
138138
if (output.html() !== "") {
139139
output.append("<br />" + msg);
140140
} else {
141-
output.html(msg);
141+
142+
// in case the output is not a string or an html element,
143+
// just stringify it.
144+
try {
145+
output.html(msg);
146+
} catch(e) {
147+
output.html(JSON.stringify(msg));
148+
}
149+
142150
}
143151
};
144152

0 commit comments

Comments
 (0)