From ba6603904dc773be9e2b72b1cd8af3de4d68a8f0 Mon Sep 17 00:00:00 2001 From: surunzi Date: Sat, 3 Sep 2016 15:50:04 +0800 Subject: [PATCH] Fix: Log HTMLDocument --- src/lib/stringify.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/stringify.es6 b/src/lib/stringify.es6 index 5a08bb1..d4126cd 100644 --- a/src/lib/stringify.es6 +++ b/src/lib/stringify.es6 @@ -215,7 +215,7 @@ export default function stringify(obj, { // https://docs.webplatform.org/wiki/dom/HTMLAllCollection // Might cause a performance issue when stringify a dom element. json = wrapStr('[object HTMLAllCollection]'); - } else if (type === '[object HTMLDocument]') + } else if (type === '[object HTMLDocument]' && level > 0) { // Same as reason above. json = wrapStr('[object HTMLDocument]');