Skip to content

Commit a39f401

Browse files
committed
Parse option.timeout strings
1 parent 3f3a36d commit a39f401

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/index.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ exports.create = (string, options, callback) ->
3131
child.stdin.end()
3232
child.kill()
3333
stderr = [new Buffer('PDF creation timeout. PDF generation script did not end.')] unless stderr.length
34-
, options.timeout || 10000
34+
, parseInt(options.timeout) || 10000
3535

3636
child.stdout.on 'data', (buffer) ->
3737
stdout.push(buffer)

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ exports.create = function(string, options, callback) {
2828
if (!stderr.length) {
2929
return stderr = [new Buffer('PDF creation timeout. PDF generation script did not end.')];
3030
}
31-
}, options.timeout || 10000);
31+
}, parseInt(options.timeout) || 10000);
3232
child.stdout.on('data', function(buffer) {
3333
return stdout.push(buffer);
3434
});

0 commit comments

Comments
 (0)