Browse Source

minor fix

Nicolas Cannasse 15 years ago
parent
commit
39f286aef8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      std/js/_std/Reflect.hx

+ 4 - 0
std/js/_std/Reflect.hx

@@ -85,6 +85,10 @@
 	}
 
 	public static function compareMethods( f1 : Dynamic, f2 : Dynamic ) : Bool {
+		if( f1 == f2 )
+			return true;
+		if( !isFunction(f1) || !isFunction(f2) )
+			return false;
 		return f1.scope == f2.scope && f1.method == f2.method && f1.method != null;
 	}