Merge pull request #2315 from guybedford/master

Support non-JSON script attributes
This commit is contained in:
Luke Page
2014-11-28 13:26:11 +00:00

View File

@@ -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(_) {}
}
}
}