Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shahrul committed Oct 1, 2023
1 parent a3494c3 commit fd47279
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions libs/executeQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const executeQuery = async (query, currentQuery, opts, mergeQuery = {}) => {
if (alias) {
key = `${key}/${alias}`
}
currentQuery = await resolvePromises(currentQuery)
if (value instanceof Object) {
currentQuery = await resolvePromises(currentQuery)
result = await executeQuery(value, currentQuery, { methods, config }, mergeQuery)
if (currentQuery) {
if (!(currentQuery instanceof Array) && currentQuery && Object.entries(value) !== result) {
Expand All @@ -88,7 +88,6 @@ const executeQuery = async (query, currentQuery, opts, mergeQuery = {}) => {
}
buildEntries.push([key, result])
} else {
currentQuery = await resolvePromises(currentQuery)
// resolved scalar/non-scalar value, and consequently same types
buildEntries.push([key, typeof currentQuery === typeof value ? currentQuery : value === '*' ? currentQuery : value])
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@syarul/requrse",
"version": "0.1.10",
"version": "0.1.11",
"description": "Lightweight driven query language",
"main": "libs/executor.js",
"scripts": {
Expand Down

0 comments on commit fd47279

Please sign in to comment.