Please add validations same as "Stylesheet.prototype.apply" method inside method below.
|
Stylesheet.prototype.applyToFile = function(sourcePath, params, options, callback) { |
This method throws an error "TypeError: callback is not a function" if called only with 2 params as below:
// documentPath : some inaccessible invalid path
stylesheet.applyToFile(documentPath, function(error, result) {
if( !err ) {
// handle success
} else {
// handle error
}
});
But above code works well with accessible valid value "documentPath".
Please add validations same as "Stylesheet.prototype.apply" method inside method below.
node-libxslt/index.js
Line 183 in c51e287
This method throws an error "TypeError: callback is not a function" if called only with 2 params as below:
But above code works well with accessible valid value "documentPath".