diff --git a/debug.js b/debug.js index 2a90045..69903d5 100644 --- a/debug.js +++ b/debug.js @@ -10,12 +10,17 @@ function prettyDOM(htmlElement, maxLength, options) { htmlElement = htmlElement.documentElement; } - const debugContent = prettyFormat(htmlElement, { - plugins: [DOMElement, DOMCollection], - printFunctionName: false, - highlight: true, - ...options - }); + const debugContent = prettyFormat( + htmlElement, + Object.assign( + { + plugins: [DOMElement, DOMCollection], + printFunctionName: false, + highlight: true + }, + options + ) + ); return maxLength !== undefined && htmlElement.outerHTML.length > maxLength ? `${debugContent.slice(0, maxLength)}...` : debugContent;