[Pkg-javascript-commits] [less.js] 03/10: Support non-JSON script attributes

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:26:32 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v2.1.2
in repository less.js.

commit 2c1172df21dad1d2358809728719f58051c678ad
Author: Guy Bedford <guybedford at gmail.com>
Date:   Fri Nov 28 15:08:08 2014 +0200

    Support non-JSON script attributes
---
 lib/less-browser/utils.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/less-browser/utils.js b/lib/less-browser/utils.js
index e743953..7a645b1 100644
--- a/lib/less-browser/utils.js
+++ b/lib/less-browser/utils.js
@@ -13,7 +13,10 @@ module.exports = {
                 if (opt === "env" || opt === "dumpLineNumbers" || opt === "rootpath" || opt === "errorReporting") {
                     options[opt] = tag.dataset[opt];
                 } else {
-                    options[opt] = JSON.parse(tag.dataset[opt]);
+                    try {
+                        options[opt] = JSON.parse(tag.dataset[opt]);
+                    }
+                    catch(_) {}
                 }
             }
         }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list