Skip to content

Commit da9c08c

Browse files
committed
simplified
1 parent 60ce6f7 commit da9c08c

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

src/Commands/Base/Completers/CustomActionCompleter.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ protected override IEnumerable<CompletionResult> GetArguments(string commandName
2626
{
2727
case CustomActionScope.Web:
2828
{
29-
PnPContext.Web.UserCustomActions.LoadAsync(u => u.Id);
30-
3129
foreach (var ca in PnPContext.Web.UserCustomActions)
3230
{
3331
results.Add(new CompletionResult(ca.Id.ToString()));
@@ -36,7 +34,6 @@ protected override IEnumerable<CompletionResult> GetArguments(string commandName
3634
}
3735
case CustomActionScope.Site:
3836
{
39-
PnPContext.Site.UserCustomActions.LoadAsync(u => u.Id);
4037
foreach (var ca in PnPContext.Site.UserCustomActions)
4138
{
4239
results.Add(new CompletionResult(ca.Id.ToString()));
@@ -45,9 +42,6 @@ protected override IEnumerable<CompletionResult> GetArguments(string commandName
4542
}
4643
default:
4744
{
48-
PnPContext.Web.UserCustomActions.LoadAsync(u => u.Id);
49-
PnPContext.Site.UserCustomActions.LoadAsync(u => u.Id);
50-
5145
foreach (var ca in PnPContext.Web.UserCustomActions)
5246
{
5347
results.Add(new CompletionResult(ca.Id.ToString()));

src/Commands/Branding/GetCustomAction.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,11 @@ protected override void ExecuteCmdlet()
3838
{
3939
case CustomActionScope.Web:
4040
{
41-
PnPContext.Web.LoadAsync(w => w.UserCustomActions).GetAwaiter().GetResult();
4241
actions = PnPContext.Web.UserCustomActions.ToList();
4342
break;
4443
}
4544
case CustomActionScope.Site:
4645
{
47-
PnPContext.Site.LoadAsync(s => s.UserCustomActions).GetAwaiter().GetResult();
4846
actions = PnPContext.Site.UserCustomActions.ToList();
4947
break;
5048
}

0 commit comments

Comments
 (0)