coding standards if statement should always be followed by braces. also, add comment
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2987 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -146,8 +146,12 @@ OpenLayers.Event = {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
_observeAndCache: function(element, name, observer, useCapture) {
|
_observeAndCache: function(element, name, observer, useCapture) {
|
||||||
if (!this.observers) this.observers = new Object();
|
|
||||||
|
|
||||||
|
//if observers cache has not yet been created, create it
|
||||||
|
if (!this.observers) {
|
||||||
|
this.observers = new Object();
|
||||||
|
}
|
||||||
|
|
||||||
//if there is not yet a hash entry for this element, add one
|
//if there is not yet a hash entry for this element, add one
|
||||||
if (!this.observers[element.id]) {
|
if (!this.observers[element.id]) {
|
||||||
this.observers[element.id] = new Array();
|
this.observers[element.id] = new Array();
|
||||||
|
|||||||
Reference in New Issue
Block a user