Skip to content

Commit

Permalink
Removed option to call sum() with string literal argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Lwiel committed Jan 16, 2023
1 parent d324407 commit f13618a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
8 changes: 0 additions & 8 deletions src/Raven.Server/Documents/Patch/JavaScriptUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,6 @@ internal JsValue Sum(JsValue self, JsValue[] args)
}
}
}

if (args[0] is JsString fieldName)
{
doc.TryGetValue(fieldName, out var sumValue);

return sumValue;
}

return null;
}

Expand Down
5 changes: 0 additions & 5 deletions src/Raven.Server/Documents/Queries/HasSpecialMethodVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ public override void VisitCallExpression(CallExpression callExpression)
}
}
}

if (callExpression.Arguments.AsNodes()[0] is Literal fieldNameLiteral)
{
_queryMetadata.SumInJs = fieldNameLiteral.StringValue;
}
}

break;
Expand Down

0 comments on commit f13618a

Please sign in to comment.