polyfill Error.captureStackTrace in FF

fixes #412
This commit is contained in:
tophf 2018-07-04 19:21:21 +03:00
parent 01ffcf63e4
commit 766a38e9e8

View File

@ -51,6 +51,7 @@ var usercss = (() => {
return loadScript('/vendor/stylus-lang/stylus.min.js').then(() => ( return loadScript('/vendor/stylus-lang/stylus.min.js').then(() => (
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
const varDef = Object.keys(vars).map(key => `${key} = ${vars[key].value};\n`).join(''); const varDef = Object.keys(vars).map(key => `${key} = ${vars[key].value};\n`).join('');
if (!Error.captureStackTrace) Error.captureStackTrace = () => {};
window.stylus(varDef + source).render((err, output) => { window.stylus(varDef + source).render((err, output) => {
if (err) { if (err) {
reject(err); reject(err);