Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/AdaptiveExpressions/Memory/SimpleObjectMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public SimpleObjectMemory(object memory)
public bool TryGetValue(string path, out object value)
{
value = null;
if (memory == null || path.Length == 0 || (path[0] != '[' && !char.IsLetter(path[0])))
if (memory == null || path.Length == 0)
{
return false;
}
Expand Down
2 changes: 2 additions & 0 deletions tests/AdaptiveExpressions.Tests/ExpressionParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class ExpressionParserTests

private readonly object scope = new Dictionary<string, object>
{
{ "$index", "index" },
{
"alist", new List<A>() { new A("item1"), new A("item2") }
},
Expand Down Expand Up @@ -265,6 +266,7 @@ public class ExpressionParserTests
{
#region accessProperty and accessIndex
Test("alist[0].Name", "item1"),
Test("$index", "index"),
#endregion

#region string interpolation test
Expand Down