Open hhsnopek opened 6 years ago
I can pull request the solution in a short bit, for now I'm dropping the solution here:
svgo.optimize(rendered, ({ error, data }) => {
if (error) reject(new Error(error))
resolve(reshapeParser(data, ctx))
})
Backwards compatible node solution:
svgo.optimize(rendered, (res) => {
if (res.error) reject(new Error(res.error))
resolve(reshapeParser(res.data, ctx))
})
Edit: added backward compatible solution
Problem
During the investigation of #26, I discovered all the errors from svgo are silent.
Cause
Missing error handler when receiving the svgo results, lib/modules/minifySvg.js#L9