From f5528c766f651a2f6b6f812ef53057d73aab9d85 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Tue, 20 May 2014 22:32:26 -0700 Subject: [PATCH] only execute callback if it's not undefined --- lib/channel/playlist.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/channel/playlist.js b/lib/channel/playlist.js index 9077a9d4..476018c9 100644 --- a/lib/channel/playlist.js +++ b/lib/channel/playlist.js @@ -1000,7 +1000,9 @@ PlaylistModule.prototype.refreshGoogleDocs = function (cb) { if (self.current) { self.current.media.meta.object = self.current.media.meta.object || null; } - cb(); + if (cb) { + cb(); + } }; if (!this.current || this.current.media.type !== "gd") {