rem: if (isToolbarItem(toolbarItem)) { 
add: if (toolbarItem && isToolbarItem(toolbarItem)) { 
context:  function unwrapToolbarItems(){  for (var i = 0; i < gToolbox.childNodes.length; ++i) {    var toolbar = getToolbarAt(i);    if (isCustomizableToolbar(toolbar)) {      toolbar.removeAttribute('previousset'); // remove previous set attribute      for (var k = 0; k < toolbar.childNodes.length; ++k) {        var paletteItem = toolbar.childNodes[k];        var toolbarItem = paletteItem.firstChild;        if (isToolbarItem(toolbarItem)) {          var nextSibling = paletteItem.nextSibling;          if (paletteItem.hasAttribute("itemcommand"))            toolbarItem.setAttribute("command", paletteItem.getAttribute("itemcommand"));          if (paletteItem.hasAttribute("itemobserves"))            toolbarItem.setAttribute("observes", paletteItem.getAttribute("itemobserves"));          paletteItem.removeChild(toolbarItem);           paletteItem.parentNode.removeChild(paletteItem);          if (nextSibling)            toolbar.insertBefore(toolbarItem, nextSibling);          else            toolbar.appendChild(toolbarItem);        }      }    }  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/17e4921eea8e13a51eab5a71b62d62009cd7a6e7/customizeToolbar.js/buggy/mail/base/content/customizeToolbar.js