290 | | var label = ( this.state == CKEDITOR.TRISTATE_OFF ) |
291 | | ? lang.maximize : lang.minimize; |
292 | | var buttonNode = editor.element.getDocument().getById( button._.id ); |
293 | | buttonNode.getChild( 1 ).setHtml( label ); |
294 | | buttonNode.setAttribute( 'title', label ); |
295 | | buttonNode.setAttribute( 'href', 'javascript:void("' + label + '");' ); |
| 290 | // Only try to change the button if it exists (#6166) |
| 291 | if( button ) |
| 292 | { |
| 293 | var label = ( this.state == CKEDITOR.TRISTATE_OFF ) |
| 294 | ? lang.maximize : lang.minimize; |
| 295 | var buttonNode = editor.element.getDocument().getById( button._.id ); |
| 296 | buttonNode.getChild( 1 ).setHtml( label ); |
| 297 | buttonNode.setAttribute( 'title', label ); |
| 298 | buttonNode.setAttribute( 'href', 'javascript:void("' + label + '");' ); |
| 299 | } |