File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/services/api/src/modules/schema/providers Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -765,7 +765,7 @@ export function detectUrlChanges(
765
765
const before = nameToCompositeSchemaMap . get ( schema . service_name ) ;
766
766
767
767
if ( before && before . service_url !== schema . service_url ) {
768
- if ( before . service_url && schema . service_url ) {
768
+ if ( before . service_url != null && schema . service_url != null ) {
769
769
changes . push ( {
770
770
type : 'REGISTRY_SERVICE_URL_CHANGED' ,
771
771
meta : {
@@ -776,7 +776,7 @@ export function detectUrlChanges(
776
776
} ,
777
777
} ,
778
778
} ) ;
779
- } else if ( before . service_url && schema . service_url == null ) {
779
+ } else if ( before . service_url != null && schema . service_url == null ) {
780
780
changes . push ( {
781
781
type : 'REGISTRY_SERVICE_URL_CHANGED' ,
782
782
meta : {
@@ -787,7 +787,7 @@ export function detectUrlChanges(
787
787
} ,
788
788
} ,
789
789
} ) ;
790
- } else if ( before . service_url == null && schema . service_url ) {
790
+ } else if ( before . service_url == null && schema . service_url != null ) {
791
791
changes . push ( {
792
792
type : 'REGISTRY_SERVICE_URL_CHANGED' ,
793
793
meta : {
@@ -799,7 +799,9 @@ export function detectUrlChanges(
799
799
} ,
800
800
} ) ;
801
801
} else {
802
- throw new Error ( "This shouldn't happen." ) ;
802
+ throw new Error (
803
+ `This shouldn't happen (before.service_url=${ JSON . stringify ( before . service_url ) } , schema.service_url=${ JSON . stringify ( schema . service_url ) } ).` ,
804
+ ) ;
803
805
}
804
806
}
805
807
}
You can’t perform that action at this time.
0 commit comments