diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index c09f531bd9..02e21c8ab5 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -9,7 +9,7 @@ OpenLayers.Class = { create: function() { return function() { - if (arguments && arguments[0] != OpenLayers.Class.isPrototype) + if (!arguments || arguments[0] != OpenLayers.Class.isPrototype) this.initialize.apply(this, arguments); } }, diff --git a/lib/OpenLayers/Geometry/Point.js b/lib/OpenLayers/Geometry/Point.js index e57fcb1f09..b3b1344835 100644 --- a/lib/OpenLayers/Geometry/Point.js +++ b/lib/OpenLayers/Geometry/Point.js @@ -18,7 +18,7 @@ */ OpenLayers.Geometry.Point = OpenLayers.Class.create(); OpenLayers.Geometry.Point.prototype = - OpenLayers.Class.inherit(OpenLayers.LonLat, OpenLayers.Geometry, { + OpenLayers.Class.inherit(OpenLayers.Geometry, OpenLayers.LonLat, { /** @type float */ x: null, @@ -33,8 +33,8 @@ OpenLayers.Geometry.Point.prototype = * @param {float} y */ initialize: function(x, y) { - OpenLayers.LonLat.prototype.initialize.apply(this, arguments); OpenLayers.Geometry.prototype.initialize.apply(this, arguments); + OpenLayers.LonLat.prototype.initialize.apply(this, arguments); this.x = this.lon; this.y = this.lat;