From 74c08dd582f8179957c7e815d0e25459b0eae1e9 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 15 May 2007 21:13:28 +0000 Subject: [PATCH] #694 - regarding inheritance of toString: for IE, check that instance has it's own toString - for Safari, just check toString git-svn-id: http://svn.openlayers.org/trunk/openlayers@3150 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/BaseTypes.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index f342f69ac7..1b426f5c1b 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -31,8 +31,9 @@ OpenLayers.Class = { // so the util.extend() doesnt copy it over. we do it manually. // // to be revisited in 3.0 - // - if (arguments[i].hasOwnProperty('toString')) { + // + if((arguments[i].hasOwnProperty && arguments[i].hasOwnProperty('toString')) || + (!arguments[i].hasOwnProperty && arguments[i].toString)) { proto.toString = arguments[i].toString; } }