Skip to content

Commit

Permalink
[DE PE SSE] Fix condition of adding background plugins into menu
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaSvinareva committed Sep 27, 2023
1 parent c598fc7 commit a959335
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/common/main/lib/controller/Plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ define([
isBackground = false;
collection.each(function (model) {
var new_rank = model.get('groupRank'),
is_visual = model.get('isVisual');
if (!is_visual) {
isBackgroundPlugin = model.get('isBackgroundPlugin');
if (isBackgroundPlugin) {
me.backgroundPlugins.push(model);
return;
}
Expand Down Expand Up @@ -732,7 +732,7 @@ define([
var variationsArr = [],
pluginVisible = false,
isDisplayedInViewer = false,
isVisual = false,
isBackgroundPlugin = false,
isSystem;
item.variations.forEach(function(itemVar, itemInd){
isSystem = (true === itemVar.isSystem) || ("system" === itemVar.type);
Expand Down Expand Up @@ -769,7 +769,7 @@ define([

variationsArr.push(model);
if (itemInd === 0) {
isVisual = itemVar.isVisual;
isBackgroundPlugin = itemVar.type ? itemVar.type === 'background' : !itemVar.isVisual;
}
}
});
Expand All @@ -794,7 +794,7 @@ define([
minVersion: item.minVersion,
original: item,
isDisplayedInViewer: isDisplayedInViewer,
isVisual: isVisual,
isBackgroundPlugin: pluginVisible && isBackgroundPlugin,
isSystem: isSystem
}));
}
Expand Down

0 comments on commit a959335

Please sign in to comment.