diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index c09f531bd9..edcf84db3a 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -23,6 +23,18 @@ OpenLayers.Class = { arguments[i] = new mixin(OpenLayers.Class.isPrototype); } OpenLayers.Util.extend(proto, arguments[i]); + + // This is a hack for IE see + // http://trac.openlayers.org/attachment/ticket/552 + // + // The problem is that ie doesnt recognize toString as a property + // so the util.extend() doesnt copy it over. we do it manually. + // + // to be revisited in 3.0 + // + if (arguments[i].toString) { + proto.toString = arguments[i].toString; + } } return proto; }