Skip to content

Commit

Permalink
fixed some code typo bugs in render function
Browse files Browse the repository at this point in the history
  • Loading branch information
dodo committed Dec 3, 2010
1 parent 3e4d6ef commit 34670ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/node-canvas-svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ exports.svg.render = function (/*canvas, svgdata, width, height, options, callba

var svgdata = "", canvas = null;
if (typeof args.first === 'string') {
svgdata = args.shift();
svgdata = arglist.shift();
} else {
canvas = args.shift();
svgdata = args.shift();
canvas = arglist.shift();
svgdata = arglist.shift();
}

if (!svgdata)
Expand Down Expand Up @@ -89,7 +89,7 @@ exports.svg.render = function (/*canvas, svgdata, width, height, options, callba
canvas = new Canvas(width, height);
}

var options = arglist ? args.last : {},
var options = arglist.length ? args.last : {},
defaults = {
renderCallback : function () { args.callback(null, canvas) },
ignoreMouse: true,
Expand Down

0 comments on commit 34670ba

Please sign in to comment.