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; } }