only execute callback if it's not undefined

This commit is contained in:
Calvin Montgomery 2014-05-20 22:32:26 -07:00
parent 949299c5e5
commit f5528c766f
1 changed files with 3 additions and 1 deletions

View File

@ -1000,7 +1000,9 @@ PlaylistModule.prototype.refreshGoogleDocs = function (cb) {
if (self.current) {
self.current.media.meta.object = self.current.media.meta.object || null;
}
if (cb) {
cb();
}
};
if (!this.current || this.current.media.type !== "gd") {