Skip to content

Commit

Permalink
fix empty property values
Browse files Browse the repository at this point in the history
  • Loading branch information
bertt committed Jul 23, 2024
1 parent 02b8314 commit fa24810
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/GPUTileHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,13 @@ private static PropertyTable GetPropertyTable(StructuralMetadataClass schemaClas
// todo: use other types than string
var strings = values.Select(s => s.ToString()).ToArray();

propertyTable
.UseProperty(nameProperty)
.SetValues(strings);
// if all values are empty strings, then do not add the property
if (!strings.All(s => string.IsNullOrEmpty(s)))
{
propertyTable
.UseProperty(nameProperty)
.SetValues(strings);
}
}

return propertyTable;
Expand Down

0 comments on commit fa24810

Please sign in to comment.