Skip to content

Commit 7603961

Browse files
committed
Merge pull request #27 from vish250491/master
Safari related issue fixed
2 parents 5d326a3 + 56c6bf6 commit 7603961

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

control/content/controllers/content.home.controller.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -197,20 +197,24 @@
197197
ContentHome.deleteEntity = function (obj, isFolder) {
198198
var nodeData = obj.$modelValue;
199199
var pluginInstanceArray=[];
200+
201+
function getLeaf(node) {
202+
if (node.items) {
203+
node.items.forEach(function (item) {
204+
return getLeaf(item);
205+
});
206+
}
207+
else {
208+
return pluginInstanceArray.push(node.instanceId);
209+
}
210+
}
211+
200212
Modals.removePopupModal(isFolder).then(function (result) {
201213
if (result) {
202214
if (nodeData.hasOwnProperty('items')) {
215+
203216
getLeaf(nodeData);
204-
function getLeaf(node) {
205-
if (node.items) {
206-
node.items.forEach(function (item) {
207-
return getLeaf(item);
208-
});
209-
}
210-
else {
211-
return pluginInstanceArray.push(node.instanceId);
212-
}
213-
}
217+
214218

215219
ContentHome.info.data._buildfire.plugins.data = ContentHome.info.data._buildfire.plugins.data.filter(function(x) { return pluginInstanceArray.indexOf(x) < 0 })
216220

0 commit comments

Comments
 (0)