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 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)}