Core: Add debug warning when widget is added more than once

This commit is contained in:
Rob Garrison 2016-03-02 08:12:24 -06:00
parent d74fd843e7
commit 4d6c714a0c

View File

@ -1848,6 +1848,9 @@
*/
addWidget : function( widget ) {
if ( widget.id && !ts.isEmptyObject( ts.getWidgetById( widget.id ) ) ) {
console.warn( '"' + widget.id + '" widget was loaded more than once!' );
}
ts.widgets[ ts.widgets.length ] = widget;
},