File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -312,8 +312,6 @@ WOQLQuery.prototype.comment = function (comment, subquery) {
312312 */
313313
314314WOQLQuery . prototype . select = function ( ...varNames ) {
315- // if (list && list[0] === 'args')
316- // return ['variable_list', 'query']
317315 if ( this . cursor [ '@type' ] ) this . wrapCursorWithAnd ( ) ;
318316 this . cursor [ '@type' ] = 'Select' ;
319317 if ( ! varNames || varNames . length <= 0 ) {
@@ -324,7 +322,7 @@ WOQLQuery.prototype.select = function (...varNames) {
324322 *@type {any }
325323 */
326324 let embedquery = false ;
327- if ( typeof last === 'object' && last . json ) {
325+ if ( typeof last === 'object' && ! ( last instanceof Var ) && last . json ) {
328326 embedquery = varNames . pop ( ) ;
329327 } // else var embedquery = false
330328 this . cursor . variables = this . rawVarList ( varNames ) ;
@@ -350,7 +348,7 @@ WOQLQuery.prototype.distinct = function (...varNames) {
350348 * @type {any }
351349 */
352350 let embedquery = false ;
353- if ( typeof last === 'object' && last . json ) {
351+ if ( typeof last === 'object' && ! ( last instanceof Var ) && last . json ) {
354352 embedquery = varNames . pop ( ) ;
355353 } // else var embedquery = false
356354 this . cursor . variables = this . rawVarList ( varNames ) ;
You can’t perform that action at this time.
0 commit comments