From f45525e9f3d9061ac4b706a2e0ad11460574d82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Dvo=C5=99=C3=A1k?= Date: Fri, 3 Jan 2014 01:39:54 +0100 Subject: [PATCH 1/2] Makes an error in JSLint and also in JSHint So some small repair, but I haven't tested, if the function will do the same as before... --- src/html5shiv-printshiv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html5shiv-printshiv.js b/src/html5shiv-printshiv.js index bc7fb34..ae9aa80 100644 --- a/src/html5shiv-printshiv.js +++ b/src/html5shiv-printshiv.js @@ -359,7 +359,7 @@ // copy element attributes to the wrapper while (index--) { node = nodes[index]; - node.specified && wrapper.setAttribute(node.nodeName, node.nodeValue); + return (node.specified && wrapper.setAttribute(node.nodeName, node.nodeValue)); } // copy element styles to the wrapper wrapper.style.cssText = element.style.cssText; From 2332eaee178378a7770bd67a6055715589e4089f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Dvo=C5=99=C3=A1k?= Date: Fri, 3 Jan 2014 03:44:19 +0100 Subject: [PATCH 2/2] if clause instead return --- src/html5shiv-printshiv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html5shiv-printshiv.js b/src/html5shiv-printshiv.js index ae9aa80..a316e05 100644 --- a/src/html5shiv-printshiv.js +++ b/src/html5shiv-printshiv.js @@ -359,7 +359,7 @@ // copy element attributes to the wrapper while (index--) { node = nodes[index]; - return (node.specified && wrapper.setAttribute(node.nodeName, node.nodeValue)); + if (node.specified) wrapper.setAttribute(node.nodeName, node.nodeValue); } // copy element styles to the wrapper wrapper.style.cssText = element.style.cssText;