From 63e60e65f0ec677055a9614c1875745298c57c61 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sat, 7 Jun 2014 13:00:23 -0700 Subject: [PATCH] Fix meta clearing on playlist save --- lib/channel/playlist.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/channel/playlist.js b/lib/channel/playlist.js index b27d18cf..fadf0e48 100644 --- a/lib/channel/playlist.js +++ b/lib/channel/playlist.js @@ -132,14 +132,14 @@ PlaylistModule.prototype.load = function (data) { }; PlaylistModule.prototype.save = function (data) { - var arr = this.items.toArray().map(function (m) { + var arr = this.items.toArray().map(function (item) { /* Clear Google Docs and Vimeo meta */ - if (m.meta) { - delete m.meta.object; - delete m.meta.params; - delete m.meta.direct; + if (item.media && item.media.meta) { + delete item.media.meta.object; + delete item.media.meta.params; + delete item.media.meta.direct; } - return m; + return item; }); var pos = 0; for (var i = 0; i < arr.length; i++) {