From 453765136760fe02cac4a98375d87890950c2ba3 Mon Sep 17 00:00:00 2001 From: reality Date: Wed, 23 Oct 2013 10:00:40 +0000 Subject: [PATCH] lets try that --- 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 624fd92..1c8ee7d 100644 --- a/modules/youtube/youtube.js +++ b/modules/youtube/youtube.js @@ -39,8 +39,8 @@ var youtube = function(dbot) { 'seconds': seconds }); - var link = v.link[0].href.match(this.LinkRegex) - if(!_.isUndefined(link)) { + var link = v.link[0].href.match(this.LinkRegex); + if(link) { res += ' - http://youtu.be/' + link[2]; }