Skip to content

Commit

Permalink
codeql
Browse files Browse the repository at this point in the history
  • Loading branch information
bjosttveit committed Sep 11, 2023
1 parent 8affc03 commit 2c5a0f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Altinn.App.Core/Helpers/DataModel/DataModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public void RemoveField(string key)
var propertyValue = property.GetValue(containingObject);
if (propertyValue is not System.Collections.IList listValue)
{
throw new ArgumentException($"Tried to remove row {key}, ended in a non-list ({propertyValue?.GetType().ToString()})");
throw new ArgumentException($"Tried to remove row {key}, ended in a non-list ({propertyValue?.GetType()})");
}

listValue.RemoveAt(lastGroupIndex.Value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private static void HiddenFieldsForRemovalRecurs(LayoutEvaluatorState state, Has
if (context.Component is RepeatingGroupComponent)
{
var currentRow = childContext.RowIndices?.Last();
var rowIsHidden = currentRow is not null && hiddenRow.GetValueOrDefault(currentRow.Value) == true;
var rowIsHidden = currentRow is not null && hiddenRow.GetValueOrDefault(currentRow.Value);
if (rowIsHidden)
{
continue;
Expand Down

0 comments on commit 2c5a0f4

Please sign in to comment.