prevent widgets to be stored multiple times with same Ids (leading to impossible synchronzation attempts)

This commit is contained in:
Jean-Emmanuel 2015-11-07 19:56:05 +01:00
parent ae2757b001
commit f930eb127d

View file

@ -128,6 +128,9 @@ parsewidgets = function(widgets,parent) {
if (__widgets__[widgetData.id]==undefined) {
__widgets__[widgetData.id] = []
}
if (__widgets__[widgetData.id].indexOf(widgetInner)!=-1) delete __widgets__[widgetData.id][__widgets__[widgetData.id].indexOf(widgetInner)]
__widgets__[widgetData.id].push(widgetInner)