File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2165,7 +2165,10 @@ Term.prototype.expr = function(expression, nestingLevel) {
21652165 //if (nestingLevel == null) nestingLevel = self._r.nestingLevel;
21662166 if ( _nestingLevel < 0 ) throw new Error . ReqlDriverError ( 'Nesting depth limit exceeded.\nYou probably have a circular reference somewhere' )
21672167
2168- if ( expression instanceof Term || expression . __proxy ) {
2168+ if ( expression === null ) {
2169+ return new Term ( self . _r , null , expression ) ;
2170+ }
2171+ else if ( expression instanceof Term || expression . __proxy ) {
21692172 return expression ;
21702173 }
21712174 else if ( expression instanceof Function ) {
@@ -2198,10 +2201,7 @@ Term.prototype.expr = function(expression, nestingLevel) {
21982201 return new Term ( self . _r , null , optArgs ) ;
21992202 }
22002203 else { // Primitive
2201- if ( expression === null ) {
2202- return new Term ( self . _r , null , expression ) ;
2203- }
2204- else if ( typeof expression === 'string' ) {
2204+ if ( typeof expression === 'string' ) {
22052205 // RethinkDB doesn't support the null character.
22062206 if ( / \0 0 / . test ( expression ) ) {
22072207 self . _error = new Error . ReqlDriverError ( 'The null character is currently not supported by RethinkDB' ) ;
You can’t perform that action at this time.
0 commit comments