From 606a9b5aac8ce9129ba5aa6e7dea268a62f9acc5 Mon Sep 17 00:00:00 2001 From: "Vasily A." Date: Thu, 27 Nov 2014 16:01:47 +0300 Subject: [PATCH 1/2] Remove second 'env:' in .travis.yml. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8092449f..71d667a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ node_js: install: - npm install -g grunt-cli - npm install -env: env: global: - secure: TrNVruWYaUK5ALga1y7wRY+MLjWJECUSCsBmKW5EUmIevOUxqHWu7M89FANKxstEeFRRAGH3QJbloRxnzIgh0U0ah5npE9XA1bYXGO5khoXeIyk7pNRfjIo8aEnJH1Vp8vWA6J6ovxdJ7lCFKEGvGKxGde50knVl7KFVVULlX2U= From 2c1172df21dad1d2358809728719f58051c678ad Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Fri, 28 Nov 2014 15:08:08 +0200 Subject: [PATCH 2/2] 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 e7439535..7a645b1b 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(_) {} } } }