- if(desc.getChangeRoot) {
- changeRoot = desc.getChangeRoot.call(this);
- if(!changeRoot) {
- throw new Error(
- 'Transformation {name} returned invalid change root value'
- .replace('{name}', name)
- );
- }
- } else {
- changeRoot = this.document.root;
+ changeRoot = this.getChangeRoot();
+ if(!changeRoot) {
+ throw new Error(
+ 'Transformation {name} returned invalid change root value'
+ .replace('{name}', name)
+ );