Skip to content

Commit

Permalink
use expression while resolving member (#96)
Browse files Browse the repository at this point in the history
* use expression while resolving member

* 2.14.1
  • Loading branch information
kbarbounakis authored Aug 14, 2024
1 parent 3c002c9 commit d3768c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@themost/query",
"version": "2.14.0",
"version": "2.14.1",
"description": "MOST Web Framework Codename ZeroGravity - Query Module",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
Expand Down
7 changes: 5 additions & 2 deletions src/odata.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ComparisonExpression,
MethodCallExpression,
MemberExpression,
SwitchExpression
SwitchExpression, Expression
} from './expressions';
import { SelectAnyExpression, AnyExpressionFormatter } from './expressions';
import { OrderByAnyExpression } from './expressions';
Expand Down Expand Up @@ -796,6 +796,9 @@ class OpenDataParser {
}
//search for multiple nested member expression (e.g. a/b/c)
self.resolveMember(identifier, function (err, member) {
if (member instanceof Expression) {
return callback(null, member);
}
callback.call(self, err, new MemberExpression(member));
});
}
Expand Down Expand Up @@ -1630,4 +1633,4 @@ export {
IdentifierToken,
SyntaxToken,
OpenDataParser
}
}

0 comments on commit d3768c7

Please sign in to comment.