'parent is undefined' exception in DomParser.js

While using the software I encountered this exception during save. This one-line commit will fix the error.