From f87f6a37d467e601fd103997bd7334836ca454b9 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 8 Oct 2013 14:51:44 +0000 Subject: [PATCH] fix ternary and [close [#585]] --- modules/youtube/youtube.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/youtube/youtube.js b/modules/youtube/youtube.js index 27b6137..6568f74 100644 --- a/modules/youtube/youtube.js +++ b/modules/youtube/youtube.js @@ -27,7 +27,7 @@ var youtube = function(dbot) { var v = body.feed.entry[0], seconds = v['media$group']['yt$duration'].seconds, minutes = Math.floor(seconds / 60), - seconds%60 < 10 ? seconds="0"+seconds%60 : seconds=seconds%60; + seconds = ((seconds%60 < 10) ? "0"+seconds%60 : seconds%60); if(!_.has(v, 'yt$rating')) { v['yt$rating'] = { @@ -68,7 +68,7 @@ var youtube = function(dbot) { var v = body.entry seconds = v['media$group']['yt$duration'].seconds, minutes = Math.floor(seconds / 60), - seconds%60 < 10 ? seconds="0"+seconds%60 : seconds=seconds%60; + seconds = ((seconds%60 < 10) ? "0"+seconds%60 : seconds%60); if(!_.has(v, 'yt$rating')) { v['yt$rating'] = {