Skip to content

Commit aefd0bc

Browse files
committed
Merge pull request #2315 from guybedford/master
Support non-JSON script attributes
2 parents a128801 + 2c1172d commit aefd0bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/less-browser/utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ module.exports = {
1313
if (opt === "env" || opt === "dumpLineNumbers" || opt === "rootpath" || opt === "errorReporting") {
1414
options[opt] = tag.dataset[opt];
1515
} else {
16-
options[opt] = JSON.parse(tag.dataset[opt]);
16+
try {
17+
options[opt] = JSON.parse(tag.dataset[opt]);
18+
}
19+
catch(_) {}
1720
}
1821
}
1922
}

0 commit comments

Comments
 (0)