diff options
author | Mohammad Amoush <mohammad_amoush@brown.edu> | 2019-07-23 19:27:25 -0400 |
---|---|---|
committer | Mohammad Amoush <mohammad_amoush@brown.edu> | 2019-07-23 19:27:25 -0400 |
commit | f5b17bf655ab93d3214ebd1eb7697dd21265d3b5 (patch) | |
tree | 24253105c1050eb06e4e65933c75276dd2ead58d /src | |
parent | 6cdebe507b777f60a0e30a1d7a75300304fbce09 (diff) |
Casting problem fixed
Diffstat (limited to 'src')
-rw-r--r-- | src/client/apis/youtube/YoutubeBox.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/apis/youtube/YoutubeBox.tsx b/src/client/apis/youtube/YoutubeBox.tsx index 8d6334c6e..019d191bc 100644 --- a/src/client/apis/youtube/YoutubeBox.tsx +++ b/src/client/apis/youtube/YoutubeBox.tsx @@ -86,7 +86,7 @@ export class YoutubeBox extends React.Component<FieldViewProps> { let contentDetails = await Cast(jsonDetailList![index].contentDetails, Doc); let statistics = await Cast(jsonDetailList![index].statistics, Doc); duration = this.convertIsoTimeToDuration(StrCast(contentDetails!.duration)); - viewCount = this.abbreviateViewCount(NumCast(statistics!.viewCount))!; + viewCount = this.abbreviateViewCount(parseInt(StrCast(statistics!.viewCount)))!; } index = index + 1; let newTemplate: VideoTemplate = { videoId: id, videoTitle: videoTitle, thumbnailUrl: thumbnailUrl, publishDate: pusblishDate, channelTitle: channelTitle, videoDescription: videoDescription, duration: duration!, viewCount: viewCount! }; |