If link is for just 1 id (normal case), then don't use an array for ID

This commit is contained in:
Nathan Gray 2014-03-31 18:20:54 +00:00
parent dcf0cf4e95
commit de2f05ee27

View File

@ -2746,6 +2746,11 @@ var et2_nextmatch_entryheader = et2_link_entry.extend(et2_INextmatchHeader,
{
if(!value.app || !value.id) return null;
// If array with just one value, use a string instead for legacy server handling
if(typeof value.id == 'object' && value.id.shift && value.id.length == 1)
{
value.id = value.id.shift();
}
// If simple value, format it legacy string style, otherwise
// we return full value
if(typeof value.id == 'string')