* A simple class that renders text directly into a toolbar.
* @constructor
* Creates a new TextItem
- * @param {String} text
+ * @cfg {string} text
*/
Roo.Toolbar.TextItem = function(cfg){
var text = cfg || "";
if (typeof(cfg) == 'object') {
text = cfg.text || "";
- }
+ } else {
+ cfg = null;
+ }
var s = document.createElement("span");
s.className = "ytb-text";
s.innerHTML = text;