Update TabbedBar.js

Old bars were failing to delete. Added .length property in the check to fix at line 87