mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 03:08:42 +00:00
Follow-up 57a06a6e
: .getAttribute might be 'guaranteed', but not from null
Whoops. Bug: T162939 Change-Id: I5a9315e3cfc8a9e8edfb2ef597daeae09bbf5c5e
This commit is contained in:
parent
f20b9b0aa0
commit
0ca821b321
|
@ -207,14 +207,14 @@ ve.ui.MWAdvancedSettingsPage.prototype.setup = function ( metaList ) {
|
|||
// Indexing items
|
||||
indexingField = this.indexing.getField();
|
||||
indexingOption = this.getMetaItem( 'mwIndex' );
|
||||
indexingType = indexingOption.getAttribute( 'property' ) || 'default';
|
||||
indexingType = indexingOption && indexingOption.getAttribute( 'property' ) || 'default';
|
||||
indexingField.selectItemByData( indexingType );
|
||||
this.indexingOptionTouched = false;
|
||||
|
||||
// New section edit link items
|
||||
newSectionEditField = this.newEditSectionLink.getField();
|
||||
newSectionEditLinkOption = this.getMetaItem( 'mwNewSectionEdit' );
|
||||
newSectionEditLinkType = newSectionEditLinkOption.getAttribute( 'property' ) || 'default';
|
||||
newSectionEditLinkType = newSectionEditLinkOption && newSectionEditLinkOption.getAttribute( 'property' ) || 'default';
|
||||
newSectionEditField.selectItemByData( newSectionEditLinkType );
|
||||
this.newSectionEditLinkOptionTouched = false;
|
||||
|
||||
|
|
|
@ -262,9 +262,9 @@ ve.ui.MWSettingsPage.prototype.setup = function ( metaList ) {
|
|||
this.metaList = metaList;
|
||||
|
||||
// Table of Contents items
|
||||
tableOfContentsMetaItem = this.getMetaItem( 'mwTOC' );
|
||||
tableOfContentsField = this.tableOfContents.getField();
|
||||
tableOfContentsMode = tableOfContentsMetaItem.getAttribute( 'property' ) || 'default';
|
||||
tableOfContentsMetaItem = this.getMetaItem( 'mwTOC' );
|
||||
tableOfContentsMode = tableOfContentsMetaItem && tableOfContentsMetaItem.getAttribute( 'property' ) || 'default';
|
||||
tableOfContentsField.selectItemByData( tableOfContentsMode );
|
||||
this.tableOfContentsTouched = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue