Skip to content

Commit

Permalink
fix: create sub query
Browse files Browse the repository at this point in the history
  • Loading branch information
LinboLen committed Nov 21, 2024
1 parent f50ebe9 commit f975fb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/fedaco/src/query-builder/query-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ export class QueryBuilder extends Builder {
/*Creates a subquery and parse it.*/
_createSubQuery(type: 'select' | string, query: Function | QueryBuilder | string) {
if (isFunction(query)) {
query(query = this._forSubQuery());
const callback = query
callback(query = this._forSubQuery());
}
return this._parseSub(type, query);
}
Expand Down

0 comments on commit f975fb2

Please sign in to comment.