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
}
}
Expected Behavior
The
parseXMLin theDocumentPreProcessorclass callsremoveScriptElements,appendStyleSheetsandappendScripts. Each of those methods should report errors should any be encountered. See hereActual Behavior
Errors are not handled at all. The
errvariable is set tonulland passed intocallback.Suggested Fix(es)
removeScriptElements,appendStyleSheetsandappendScriptsshould be follow the callback pattern and report failure after each one is executed.