Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow DocumentPreProcessor.parseXML to error #220

Open
msimmer opened this issue Nov 24, 2018 · 0 comments
Open

Allow DocumentPreProcessor.parseXML to error #220

msimmer opened this issue Nov 24, 2018 · 0 comments

Comments

@msimmer
Copy link
Member

msimmer commented Nov 24, 2018

Expected Behavior

The parseXML in the DocumentPreProcessor class calls removeScriptElements, appendStyleSheets and appendScripts. Each of those methods should report errors should any be encountered. See here

Actual Behavior

Errors are not handled at all. The err variable is set to null and passed into callback.

Suggested Fix(es)

removeScriptElements, appendStyleSheets and appendScripts should be follow the callback pattern and report failure after each one is executed.

removeScriptElements(err => {
  if (err) {}
  appendStyleSheets(err2 => {
    // etc
  }
} 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants