We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
msg
object
1 parent b55a6f3 commit e2aadd3Copy full SHA for e2aadd3
snippet.js
@@ -1,6 +1,6 @@
1
// MIT license, see: https://github.com/tjcrowder/simple-snippets-console/blob/master/LICENSE
2
var snippet = {
3
- version: "1.1",
+ version: "1.2",
4
5
// Writes out the given text in a monospaced paragraph tag, escaping
6
// & and < so they aren't rendered as HTML.
@@ -10,7 +10,7 @@ var snippet = {
10
elm.style.margin = "2px 0 2px 0";
11
if (Object.prototype.toString.call(msg) === "[object Array]") {
12
msg = msg.join();
13
- } else if (typeof object === "object") {
+ } else if (typeof msg === "object") {
14
msg = msg === null ? "null" : JSON.stringify(msg);
15
}
16
elm.innerHTML = msg.replace(/&/g, '&').replace(/</g, '<');
0 commit comments