@@ -8,7 +8,7 @@ function hasGetterOrSetter (def)
88function getProperty ( definition , k , isClassDescriptor )
99{
1010 // This may be a lightweight object, OR it might be a property that was defined previously.
11-
11+
1212 // For simple class descriptors we can just assume its NOT previously defined.
1313 var def = ( isClassDescriptor ) ? definition [ k ] : Object . getOwnPropertyDescriptor ( definition , k ) ;
1414
@@ -74,7 +74,7 @@ function extend (ctor, definition, isClassDescriptor, extend)
7474 if ( def !== false )
7575 {
7676 // If Extends is used, we will check its prototype to see if the final variable exists.
77-
77+
7878 var parent = extend || ctor ;
7979
8080 if ( hasNonConfigurable ( parent . prototype , k ) )
@@ -136,7 +136,7 @@ function mixin (myClass, mixins)
136136 * @example
137137 *
138138 * var MyClass = new Phaser.Class({
139- *
139+ *
140140 * initialize: function() {
141141 * this.foo = 2.0;
142142 * },
@@ -171,21 +171,18 @@ function Class (definition)
171171 // here since we only call this on class creation (i.e. not object creation).
172172 delete definition . initialize ;
173173 }
174- else
174+ else if ( definition . Extends )
175175 {
176- if ( definition . Extends )
177- {
178- var base = definition . Extends ;
176+ var base = definition . Extends ;
179177
180- initialize = function ( )
181- {
182- base . apply ( this , arguments ) ;
183- } ;
184- }
185- else
178+ initialize = function ( )
186179 {
187- initialize = function ( ) { } ;
188- }
180+ base . apply ( this , arguments ) ;
181+ } ;
182+ }
183+ else
184+ {
185+ initialize = function ( ) { } ;
189186 }
190187
191188 if ( definition . Extends )
0 commit comments