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