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(
34
34
mask ?: Image . Mask ;
35
35
} ,
36
36
) : 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
+
37
47
try {
38
48
const sanitize = ( url : string ) => {
39
49
if ( ! url . startsWith ( "http" ) ) {
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export default function Command() {
5
5
return (
6
6
< List >
7
7
< List . Item icon = { getFavicon ( "https://raycast.com" ) } title = "Raycast Website" />
8
+ < List . Item icon = { getFavicon ( "raycast.com" ) } title = "Raycast Website" />
8
9
</ List >
9
10
) ;
10
11
}
You can’t perform that action at this time.
0 commit comments