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:
Timo Tijhof 2015-06-02 02:00:48 +01:00 committed by Jforrester
parent 086535875f
commit f2875141d8

View file

@ -71,7 +71,9 @@ ve.dm.MWTemplateSpecModel.prototype.extend = function ( data ) {
}
}
this.sets = data.sets;
this.maps = data.maps;
if ( data.maps ) {
this.maps = data.maps;
}
};
/**