From 086fce31ea027f470c086e5a3e0461aa235ffbbe Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 20 Oct 2015 18:21:18 +0100 Subject: [PATCH] dont fail on infoView id array data is string --- static/js/infoView.indiancinema.js | 6 ++++++ static/js/infoView.js | 6 ++++++ static/js/infoView.padma.js | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/static/js/infoView.indiancinema.js b/static/js/infoView.indiancinema.js index 2dc6da0a..dce30842 100644 --- a/static/js/infoView.indiancinema.js +++ b/static/js/infoView.indiancinema.js @@ -231,6 +231,12 @@ pandora.ui.infoView = function(data) { }); }); + listKeys.forEach(function(key) { + if (Ox.isString(data[key])) { + data[key] = [data[key]]; + } + }); + // Title ------------------------------------------------------------------- $('
') diff --git a/static/js/infoView.js b/static/js/infoView.js index 85875da2..684ea022 100644 --- a/static/js/infoView.js +++ b/static/js/infoView.js @@ -188,6 +188,12 @@ pandora.ui.infoView = function(data) { }); }); + listKeys.forEach(function(key) { + if (Ox.isString(data[key])) { + data[key] = [data[key]]; + } + }); + if (!canEdit) { pandora.createLinks($info); } diff --git a/static/js/infoView.padma.js b/static/js/infoView.padma.js index d3f9f97e..171c42ec 100644 --- a/static/js/infoView.padma.js +++ b/static/js/infoView.padma.js @@ -210,6 +210,12 @@ pandora.ui.infoView = function(data) { }); }); + listKeys.forEach(function(key) { + if (Ox.isString(data[key])) { + data[key] = [data[key]]; + } + }); + if (!canEdit) { pandora.createLinks($info); }