Skip to content

Commit

Permalink
fix(provisioning): occasional crash when setting default values
Browse files Browse the repository at this point in the history
Fixes an error introduced by my previous fix in pnp#915.
  • Loading branch information
Jake Stanger committed Oct 17, 2023
1 parent 9132748 commit 35bf7cd
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ private static void ProcessDefaultFolders(Web web, ListInfo listInfo, Model.Fold
if (!string.IsNullOrEmpty(fieldValue))
{
var field = listInfo.SiteList.Fields.GetByInternalNameOrTitle(fieldName);
field.EnsureProperties(f => f.TypeAsString);

var value = field.TypeAsString is "TaxonomyFieldType" or "TaxonomyFieldTypeMulti"
? TermIdsToProcess(fieldValue).ToArray()
Expand Down

0 comments on commit 35bf7cd

Please sign in to comment.