@@ -222,7 +222,7 @@ N3Parser.prototype = {
222222 return this . _readQuantifierList ;
223223 default :
224224 // Read the subject entity
225- if ( ! ( this . _subject = this . _readEntity ( token ) ) )
225+ if ( ( this . _subject = this . _readEntity ( token ) ) === undefined )
226226 return ;
227227 // In N3 mode, the subject might be a path
228228 if ( this . _n3Mode )
@@ -258,7 +258,7 @@ N3Parser.prototype = {
258258 if ( ! this . _n3Mode )
259259 return this . _error ( 'Disallowed blank node as predicate' , token ) ;
260260 default :
261- if ( ! ( this . _predicate = this . _readEntity ( token ) ) )
261+ if ( ( this . _predicate = this . _readEntity ( token ) ) === undefined )
262262 return ;
263263 }
264264 // The next token must be an object.
@@ -290,7 +290,7 @@ N3Parser.prototype = {
290290 return this . _readSubject ;
291291 default :
292292 // Read the object entity
293- if ( ! ( this . _object = this . _readEntity ( token ) ) )
293+ if ( ( this . _object = this . _readEntity ( token ) ) === undefined )
294294 return ;
295295 // In N3 mode, the object might be a path
296296 if ( this . _n3Mode )
@@ -433,7 +433,7 @@ N3Parser.prototype = {
433433 next = this . _readDataTypeOrLang ;
434434 break ;
435435 default :
436- if ( ! ( item = this . _readEntity ( token ) ) )
436+ if ( ( item = this . _readEntity ( token ) ) === undefined )
437437 return ;
438438 }
439439
@@ -513,7 +513,7 @@ N3Parser.prototype = {
513513 break ;
514514 default :
515515 // An entity means this is a quad (only allowed if not already inside a graph).
516- if ( this . _supportsQuads && this . _graph === null && ( graph = this . _readEntity ( token ) ) ) {
516+ if ( this . _supportsQuads && this . _graph === null && ( graph = this . _readEntity ( token ) ) !== undefined ) {
517517 next = this . _readQuadPunctuation ;
518518 break ;
519519 }
@@ -625,7 +625,7 @@ N3Parser.prototype = {
625625 switch ( token . type ) {
626626 case 'IRI' :
627627 case 'prefixed' :
628- if ( entity = this . _readEntity ( token , true ) )
628+ if ( ( entity = this . _readEntity ( token , true ) ) !== undefined )
629629 break ;
630630 default :
631631 return this . _error ( 'Unexpected ' + token . type , token ) ;
@@ -700,7 +700,7 @@ N3Parser.prototype = {
700700 _readForwardPath : function ( token ) {
701701 var subject , predicate , object = '_:b' + blankNodeCount ++ ;
702702 // The next token is the predicate
703- if ( ! ( predicate = this . _readEntity ( token ) ) )
703+ if ( ( predicate = this . _readEntity ( token ) ) === undefined )
704704 return ;
705705 // If we were reading a subject, replace the subject by the path's object
706706 if ( this . _predicate === null )
@@ -717,7 +717,7 @@ N3Parser.prototype = {
717717 _readBackwardPath : function ( token ) {
718718 var subject = '_:b' + blankNodeCount ++ , predicate , object ;
719719 // The next token is the predicate
720- if ( ! ( predicate = this . _readEntity ( token ) ) )
720+ if ( ( predicate = this . _readEntity ( token ) ) === undefined )
721721 return ;
722722 // If we were reading a subject, replace the subject by the path's subject
723723 if ( this . _predicate === null )
0 commit comments