This commit is contained in:
Chris
2025-11-13 15:18:28 -08:00
committed by GitHub
parent bc6bbc20d1
commit 692ad48023
2 changed files with 13 additions and 0 deletions
@@ -40,6 +40,12 @@ internal static class PortableValueExtensions
private static TableValue ToTable(this PortableValue[] values)
{
FormulaValue[] formulaValues = values.Select(value => value.ToFormula()).ToArray();
if (formulaValues.Length == 0)
{
return FormulaValue.NewTable(RecordType.Empty());
}
if (formulaValues[0] is RecordValue recordValue)
{
return FormulaValue.NewTable(ParseRecordType(recordValue), formulaValues.OfType<RecordValue>());