Spell projection with p and separate tests to avoid mock issues.

This commit is contained in:
tschaub
2011-11-08 11:47:59 -07:00
parent 00410cf779
commit 76bb0be254
2 changed files with 21 additions and 10 deletions

View File

@@ -101,8 +101,8 @@ OpenLayers.Projection = OpenLayers.Class({
equals: function(projection) {
var p = projection, equals = false;
if (p) {
if (!(projection instanceof OpenLayers.Projection)) {
projection = new OpenLayers.Projection(projection);
if (!(p instanceof OpenLayers.Projection)) {
p = new OpenLayers.Projection(p);
}
if (window.Proj4js && this.proj.defData && p.proj.defData) {
equals = this.proj.defData.replace(this.titleRegEx, "") ==