mirror of
https://github.com/wukko/cobalt.git
synced 2025-04-29 22:14:26 +02:00
api/snapchat: prevent errors if params are undefined
This commit is contained in:
parent
1335313e39
commit
7ff6d0036b
@ -102,10 +102,10 @@ export default async function (obj) {
|
||||
params = await resolveRedirectingURL(`https://t.snapchat.com/${obj.shortLink}`);
|
||||
}
|
||||
|
||||
if (params.spotlightId) {
|
||||
if (params?.spotlightId) {
|
||||
const result = await getSpotlight(params.spotlightId);
|
||||
if (result) return result;
|
||||
} else if (params.username) {
|
||||
} else if (params?.username) {
|
||||
const result = await getStory(params.username, params.storyId, obj.alwaysProxy);
|
||||
if (result) return result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user