Skip to content

Commit

Permalink
Fix crash when ‘info’ is absent
Browse files Browse the repository at this point in the history
  • Loading branch information
GreLI authored Sep 17, 2018
1 parent ed75e56 commit dfcc145
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/svgo.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ SVGO.prototype.optimize = function(svgstr, info) {
if (config.datauri) {
svgjs.data = encodeSVGDatauri(svgjs.data, config.datauri);
}
if(info.path) {
if (info && info.path) {
svgjs.path = info.path;
}
resolve(svgjs);
Expand Down

0 comments on commit dfcc145

Please sign in to comment.