Skip to content

Commit 8cad05a

Browse files
committed
merge master
2 parents 095dab0 + 0d8d970 commit 8cad05a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/functions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ public static function get_latest_vccw_url()
3636
$api = "https://api.github.com/repos/vccw-team/vccw/releases/latest";
3737
$body = json_decode( self::download( $api ) );
3838

39-
if ( $body ) {
39+
if ( ! empty( $body->assets[0] ) && ! empty( $body->assets[0]->browser_download_url ) ) {
40+
return $body->assets[0]->browser_download_url;
41+
} elseif ( $body ) {
4042
return $body->zipball_url;
4143
}
4244
}

0 commit comments

Comments
 (0)