From 406a08d8363163b46d4087db5138b2f33e56a594 Mon Sep 17 00:00:00 2001 From: Rasmus Porsager Date: Fri, 1 Sep 2017 14:02:58 +0200 Subject: [PATCH 1/2] Use util.inspect to log in node - fixes #1661 --- ospec/ospec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ospec/ospec.js b/ospec/ospec.js index a757543f..147e2dc4 100644 --- a/ospec/ospec.js +++ b/ospec/ospec.js @@ -222,6 +222,7 @@ module.exports = new function init(name) { results.push(result) } function serialize(value) { + if (hasProcess) return require("util").inspect(value) if (value === null || (typeof value === "object" && !(value instanceof Array)) || typeof value === "number") return String(value) else if (typeof value === "function") return value.name || "" try {return JSON.stringify(value)} catch (e) {return String(value)} From 6083c67f0733c999e23164a2fd32bd6755438c7f Mon Sep 17 00:00:00 2001 From: Rasmus Porsager Date: Fri, 1 Sep 2017 17:58:12 +0200 Subject: [PATCH 2/2] Update change-log.md --- docs/change-log.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/change-log.md b/docs/change-log.md index fa0fcd9d..f8f29e03 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -44,6 +44,9 @@ - hypertext: correct handling of shared attributes object passed to `m()`. Will copy attributes when it's necessary [#1941](https://github.com/MithrilJS/mithril.js/issues/1941) [s-ilya](https://github.com/s-ilya) ([#1942](https://github.com/MithrilJS/mithril.js/pull/1942)) - Fix IE bug where active element is null causing render function to throw error. ([1943](https://github.com/MithrilJS/mithril.js/pull/1943)) +#### Ospec improvements: + +- Log using util.inspect to show object content instead of "[object Object]" ([#1661](https://github.com/MithrilJS/mithril.js/issues/1661), [@porsager](https://github.com/porsager)) --- ### v1.1.3