Fix for Projection.equals fails when passed 'null'. r=pagameba
(Closes #1286) git-svn-id: http://svn.openlayers.org/trunk/openlayers@5825 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -89,7 +89,11 @@ OpenLayers.Projection = OpenLayers.Class({
|
||||
* {Boolean} The two projections are equivalent.
|
||||
*/
|
||||
equals: function(projection) {
|
||||
return this.getCode() == projection.getCode();
|
||||
if (projection && projection.getCode) {
|
||||
return this.getCode() == projection.getCode();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
/* Method: destroy
|
||||
|
||||
Reference in New Issue
Block a user