Prevent calling `UpdateMany` when tehre is no changes

pull/17281/head
Enis Necipoglu 1 year ago
parent 34835b5734
commit f617a52ed7
No known key found for this signature in database
GPG Key ID: 1EC55E13241E1680

@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
@ -31,6 +32,11 @@ public class PageChangedHandler :
.Where(x => x.PageId == eventData.Entity.Id)
.ToArray();
if (affectedMenuItems.IsNullOrEmpty())
{
return;
}
foreach (var menuItem in affectedMenuItems)
{
MenuManager.SetPageUrl(menuItem, eventData.Entity);

Loading…
Cancel
Save