Core: Add debug warning when widget not found

See http://stackoverflow.com/a/35713348/145346
This commit is contained in:
Rob Garrison 2016-03-02 07:56:26 -06:00
parent d089be2734
commit d74fd843e7

View File

@ -1976,6 +1976,8 @@
// set priority to 10 if not defined // set priority to 10 if not defined
if ( !widget.priority ) { widget.priority = 10; } if ( !widget.priority ) { widget.priority = 10; }
widgets[ indx ] = widget; widgets[ indx ] = widget;
} else if ( c.debug ) {
console.warn( '"' + names[ indx ] + '" widget code does not exist!' );
} }
} }
// sort widgets by priority // sort widgets by priority