aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMohammad Amoush <mohammad_amoush@brown.edu>2019-07-23 19:27:25 -0400
committerMohammad Amoush <mohammad_amoush@brown.edu>2019-07-23 19:27:25 -0400
commitf5b17bf655ab93d3214ebd1eb7697dd21265d3b5 (patch)
tree24253105c1050eb06e4e65933c75276dd2ead58d /src
parent6cdebe507b777f60a0e30a1d7a75300304fbce09 (diff)
Casting problem fixed
Diffstat (limited to 'src')
-rw-r--r--src/client/apis/youtube/YoutubeBox.tsx2
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! };