Skip to content

Commit

Permalink
Change to older-style default parameters
Browse files Browse the repository at this point in the history
ES6-style parameter defaults break on older versions of node.
  • Loading branch information
Simon Andrews committed Sep 13, 2016
1 parent d171d68 commit e755f6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/svg2png.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ module.exports.sync = (sourceBuffer, options) => {
return processResult(result);
};

function getPhantomJSArgs(options = {}) {
function getPhantomJSArgs(options) {
options = typeof options === 'undefined' ? {} : options;

if (options.filename !== undefined && options.url !== undefined) {
throw new Error("Cannot specify both filename and url options");
}
Expand Down

0 comments on commit e755f6e

Please sign in to comment.