Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js |
— | — | @@ -556,7 +556,7 @@ |
557 | 557 | } |
558 | 558 | } |
559 | 559 | }; |
560 | | - } else if ( 0 in character && 1 in character ) { |
| 560 | + } else if ( character && 0 in character && 1 in character ) { |
561 | 561 | character = { |
562 | 562 | 'label' : character[0], |
563 | 563 | 'action' : { |
— | — | @@ -568,10 +568,12 @@ |
569 | 569 | } |
570 | 570 | }; |
571 | 571 | } |
572 | | - if ( 'action' in character && 'label' in character ) { |
| 572 | + if ( character && 'action' in character && 'label' in character ) { |
573 | 573 | actions[character.label] = character.action; |
574 | 574 | return '<span rel="' + character.label + '">' + character.label + '</span>'; |
575 | 575 | } |
| 576 | + mw.log( "A character for the toolbar was undefined. This is not supposed to happen. Double check the config." ); |
| 577 | + return ""; // bug 31673; also an additional fix for bug 24208... |
576 | 578 | }, |
577 | 579 | buildTab : function( context, id, section ) { |
578 | 580 | var selected = $.cookie( 'wikiEditor-' + context.instance + '-toolbar-section' ); |