Skip to content

Commit e2aadd3

Browse files
committed
Fixed bug -- should have been checking msg, not object
1 parent b55a6f3 commit e2aadd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

snippet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// MIT license, see: https://github.com/tjcrowder/simple-snippets-console/blob/master/LICENSE
22
var snippet = {
3-
version: "1.1",
3+
version: "1.2",
44

55
// Writes out the given text in a monospaced paragraph tag, escaping
66
// & and < so they aren't rendered as HTML.
@@ -10,7 +10,7 @@ var snippet = {
1010
elm.style.margin = "2px 0 2px 0";
1111
if (Object.prototype.toString.call(msg) === "[object Array]") {
1212
msg = msg.join();
13-
} else if (typeof object === "object") {
13+
} else if (typeof msg === "object") {
1414
msg = msg === null ? "null" : JSON.stringify(msg);
1515
}
1616
elm.innerHTML = msg.replace(/&/g, '&amp;').replace(/</g, '&lt;');

0 commit comments

Comments
 (0)