From c5406bbfeb88eaa7bd8c85948b41c00ab34345e5 Mon Sep 17 00:00:00 2001 From: Schuyler Erle Date: Thu, 22 Mar 2007 20:39:16 +0000 Subject: [PATCH] Workaround for a bug in IE where toString() can't be assigned to an object in Util.extend()?? Strange but true. Fixes #552, wherein Geometry.Point tests fail. Tests now pass in IE. git-svn-id: http://svn.openlayers.org/trunk/openlayers@2861 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/BaseTypes.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; }