node-soap
node-soap copied to clipboard
Check if Schema has been defined
The Problem:
Some Magento XML gets an error in the line this.element = schema.elements[nsName.name];
because schema is undefined.
The Solution:
Simple check if schema has been defined if(schema) this.element = schema.elements[nsName.name];
Tests: All existing tests passed. I didn't create a new test because all worked well and new tests would be the same.