Skip to content

Duplicate callback invocation on error. #30

@prasad83

Description

@prasad83

parser.addListener: end and error both trigger callback if there is trouble with xml.

parser.addListener('end', function(jsonDOM) {
    if (jsonDOM) {
        //...
        if (callback) callback(null, output);
    } else {
        if (callback) callback("failed to parse xml", null);
    }
}

parser.addListener("error", function(err) {
    // ...
    callback = null;
});

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