File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,15 @@ const pinningServiceTemplates = [
57
57
visitServiceUrl : 'https://www.scaleway.com/en/docs/labs/ipfs/api-cli/ipfs-desktop/'
58
58
}
59
59
] . map ( ( service ) => {
60
- const domain = new URL ( service . apiEndpoint ) . hostname
61
- service . complianceReportUrl = `${ complianceReportsHomepage } /${ domain } .html`
62
- return service
63
- } ) . map ( service => ( { service, sort : Math . random ( ) } ) ) . sort ( ( a , b ) => a . sort - b . sort ) . map ( ( { service } ) => service )
60
+ try {
61
+ const domain = new URL ( service . apiEndpoint ) . hostname
62
+ service . complianceReportUrl = `${ complianceReportsHomepage } /${ domain } .html`
63
+ } catch ( e ) {
64
+ // if apiEndpoint is not a valid URL, don't add complianceReportUrl
65
+ // TODO: fix support for template apiEndpoints
66
+ }
67
+ return { service, sort : Math . random ( ) }
68
+ } ) . sort ( ( a , b ) => a . sort - b . sort ) . map ( ( { service } ) => service )
64
69
65
70
export {
66
71
complianceReportsHomepage ,
You can’t perform that action at this time.
0 commit comments