Skip to content

Commit

Permalink
fix: oneOf ConditionManifest
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdcdev committed Dec 31, 2024
1 parent 6bfad37 commit bfd2462
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using jcdcdev.Umbraco.Core.Extensions;
using jcdcdev.Umbraco.Core.Web.Models.Manifests;
using Umbraco.Cms.Core.Manifest;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Infrastructure.Manifest;
using Umbraco.Cms.Web.Common.PublishedModels;

Expand Down Expand Up @@ -53,7 +54,7 @@ public async Task<IEnumerable<PackageManifest>> ReadPackageManifestsAsync()
Conditions =
[
ConditionManifest.EntityIsTrashed(),
ConditionManifest.WorkspaceContentTypeAlias(Home.ModelTypeAlias)
ConditionManifest.WorkspaceContentTypeAlias([Home.ModelTypeAlias, BasePage.ModelTypeAlias])
]
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ private ConditionManifest(string alias, object[] oneOf)
}

public static ConditionManifest Create(string alias, string match) => new(alias, match);
public static ConditionManifest Create(string alias, string[] match) => new(alias, match.Select(x => (object)x));
public static ConditionManifest Create(string alias, bool match) => new(alias, match);
public static ConditionManifest Create(string alias, string[] oneOf) => new(alias, (object[])oneOf);

/// <summary>
/// Requires the current Section Alias to match the one specified.
Expand Down

0 comments on commit bfd2462

Please sign in to comment.