mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-23 18:28:51 +00:00
ve.dm.MWTemplateSpecModel: Account for data.maps being undefined
This new property is optional and should not be assumed to be present.
Follows-up 2ac7959849
.
The constructor defaults 'maps' to an empty object, so there's no need
to add a "|| {}" in extend() or getMaps(). We merely need to make sure
we don't accidentally dereference the default in exchange for undefined.
Change-Id: Id2cb93696d12a20ee14f9d59705877dc174e6564
This commit is contained in:
parent
086535875f
commit
f2875141d8
|
@ -71,7 +71,9 @@ ve.dm.MWTemplateSpecModel.prototype.extend = function ( data ) {
|
|||
}
|
||||
}
|
||||
this.sets = data.sets;
|
||||
if ( data.maps ) {
|
||||
this.maps = data.maps;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue