We should not require the vm.umbVariantContent in the DocumentTypeEditor

This commit is contained in:
Niels Lyngsø
2020-08-05 13:37:53 +02:00
parent 86508fb39a
commit 3e55460bfb

View File

@@ -64,7 +64,7 @@
});
vm.$onInit = function() {
if (!vm.umbVariantContent) {
if (vm.umbProperty && !vm.umbVariantContent) {// if we dont have vm.umbProperty, it means we are in the DocumentTypeEditor.
// not found, then fallback to searching the scope chain, this may be needed when DOM inheritance isn't maintained but scope
// inheritance is (i.e.infinite editing)
var found = angularHelper.traverseScopeChain($scope, s => s && s.vm && s.vm.constructor.name === "umbVariantContentController");