Skip to content

params and options parameters validation is missing #66

@chaitanya-mahamuni

Description

@chaitanya-mahamuni

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions