diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index c470df8253..da41163621 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -152,14 +152,20 @@ Number.prototype.limitSigDigs = function(sig) { * {Function} */ Function.prototype.bind = function() { - var __method = this, args = [], object = arguments[0]; - for (var i = 1; i < arguments.length; i++) - args.push(arguments[i]); - return function(moreargs) { - for (var i = 0; i < arguments.length; i++) - args.push(arguments[i]); - return __method.apply(object, args); - } + var __method = this; + var args = []; + var object = arguments[0]; + + for (var i = 1; i < arguments.length; i++) { + args.push(arguments[i]); + } + + return function(moreargs) { + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + return __method.apply(object, args); + }; }; /** @@ -174,8 +180,8 @@ Function.prototype.bind = function() { * {Function} */ Function.prototype.bindAsEventListener = function(object) { - var __method = this; - return function(event) { - return __method.call(object, event || window.event); - } + var __method = this; + return function(event) { + return __method.call(object, event || window.event); + }; }; \ No newline at end of file