File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,16 @@ export function getFavicon(
3434 mask ?: Image . Mask ;
3535 } ,
3636) : Image . ImageLike {
37+ // a func adding https:// to the URL
38+ // for cases where the URL is not a full URL
39+ // e.g. "raycast.com"
40+ const withHttps = ( url : string ) => {
41+ if ( ! url . startsWith ( "http" ) ) {
42+ return `https://${ url } ` ;
43+ }
44+ return url ;
45+ } ;
46+
3747 try {
3848 const sanitize = ( url : string ) => {
3949 if ( ! url . startsWith ( "http" ) ) {
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export default function Command() {
55 return (
66 < List >
77 < List . Item icon = { getFavicon ( "https://raycast.com" ) } title = "Raycast Website" />
8+ < List . Item icon = { getFavicon ( "raycast.com" ) } title = "Raycast Website" />
89 </ List >
910 ) ;
1011}
You can’t perform that action at this time.
0 commit comments