Skip to content

Commit

Permalink
#666 - INDIRECT function did not always set the correct data type whe…
Browse files Browse the repository at this point in the history
…n returning a single cell.
  • Loading branch information
swmal committed Jun 10, 2022
1 parent 6854ceb commit 709ca61
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ public override CompileResult Execute(IEnumerable<FunctionArgument> arguments, P
{
return CompileResult.Empty;
}
else if(!result.IsMulti)
{
var cell = result.FirstOrDefault();
var val = cell != null ? cell.Value : null;
if (val == null) return CompileResult.Empty;
return new CompileResultFactory().Create(val);
}
return new CompileResult(result, DataType.Enumerable);
}
}
Expand Down

0 comments on commit 709ca61

Please sign in to comment.