9962: Use $allowedEditors instead of allowed (#10086)

* 9962: Use $allowedEditors instead of allowed

* 9962: Remove redundant statement
This commit is contained in:
patrickdemooij9
2021-04-04 02:16:02 +02:00
committed by GitHub
parent f83f465211
commit f8e280e0b4

View File

@@ -141,9 +141,9 @@ angular.module("umbraco")
over: function (event, ui) {
var area = event.target.getScope_HackForSortable().area;
var allowedEditors = area.allowed;
var allowedEditors = area.$allowedEditors.map(e => e.alias);
if (($.inArray(ui.item[0].getScope_HackForSortable().control.editor.alias, allowedEditors) < 0 && allowedEditors) ||
if (($.inArray(ui.item[0].getScope_HackForSortable().control.editor.alias, allowedEditors) < 0) ||
(startingArea != area && area.maxItems != '' && area.maxItems > 0 && area.maxItems < area.controls.length + 1)) {
$scope.$apply(function () {