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

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;
}
cb();
if (cb) {
cb();
}
};
if (!this.current || this.current.media.type !== "gd") {