mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-22 06:49:26 +01:00
fix setting the duration (fixes #240)
This commit is contained in:
parent
0707349a85
commit
9e515c4985
@ -28,9 +28,15 @@ async function fromJson(data, user_preferences, subreddit_front) {
|
||||
result.domain = data.domain
|
||||
result.is_video = data.is_video
|
||||
result.media = data.media
|
||||
result.duration = data.is_video ? data.media.reddit_video ? data.media.reddit_video.duration : void 0 : void 0
|
||||
result.duration = null
|
||||
result.images = null
|
||||
|
||||
if(data.is_video && data.media) {
|
||||
if(data.media.reddit_video) {
|
||||
result.duration = data.media.reddit_video.duration
|
||||
}
|
||||
}
|
||||
|
||||
// Moderation attributes
|
||||
result.locked = data.locked
|
||||
result.stickied = data.stickied
|
||||
|
Loading…
Reference in New Issue
Block a user