File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -641,7 +641,7 @@ export class ExampleGenerator extends AmfHelperMixin(Object) {
641641 example ,
642642 this . ns . aml . vocabularies . document . raw
643643 ) ) ;
644- if ( ! raw ) {
644+ if ( raw === null || raw === undefined ) {
645645 raw = /** @type {string } */ ( this . _getValue (
646646 example ,
647647 this . ns . w3 . shacl . raw
@@ -707,7 +707,7 @@ export class ExampleGenerator extends AmfHelperMixin(Object) {
707707 example ,
708708 this . ns . aml . vocabularies . core . description
709709 ) ) ;
710- const hasRaw = ! ! raw ;
710+ const hasRaw = raw !== null && raw !== undefined ;
711711 const result = { } ;
712712 result . hasTitle = ! ! title ;
713713 result . hasUnion = false ;
@@ -717,7 +717,7 @@ export class ExampleGenerator extends AmfHelperMixin(Object) {
717717 if ( result . hasTitle ) {
718718 result . title = title ;
719719 }
720- if ( opts . rawOnly && ! raw ) {
720+ if ( opts . rawOnly && ( raw !== null || raw !== undefined ) ) {
721721 return undefined ;
722722 }
723723 if ( opts . rawOnly ) {
You can’t perform that action at this time.
0 commit comments