Fix crash

This commit is contained in:
bingus_violet 2024-07-04 19:17:09 -05:00
parent f0a605091f
commit dd1f6c796b

View file

@ -3,8 +3,6 @@ const path = require("path"),
var constants = JSON.parse(fs.readFileSync(path.join(__dirname, 'constants.json')))
var activityImages = constants.activityImages
function get_img_url(activity, size = "large_image") {
if ("assets" in activity) {
var image = activity.assets[size]
@ -21,9 +19,7 @@ function get_img_url(activity, size = "large_image") {
}
if (!image && size == "large_image") {
if (activity.name in activityImages) {
return decodeURIComponent(activityImages[activity.name])
}
}
return null
}