2
0
Эх сурвалжийг харах

DEInvalidValue if spod object not found

Nicolas Cannasse 14 жил өмнө
parent
commit
6c9b5eeffa

+ 5 - 2
std/haxe/web/Dispatch.hx

@@ -171,11 +171,14 @@ class Dispatch {
 			if( v == null ) throw DEInvalidValue;
 			if( v == null ) throw DEInvalidValue;
 			var cl = Type.resolveClass(c);
 			var cl = Type.resolveClass(c);
 			if( cl == null ) throw "assert";
 			if( cl == null ) throw "assert";
+			var o : Dynamic;
 			#if spod_macro
 			#if spod_macro
-			return untyped cl.manager.unsafeGet(v, lock);
+			o = untyped cl.manager.unsafeGet(v, lock);
 			#else
 			#else
-			return untyped cl.manager.get(v, lock);
+			o = untyped cl.manager.get(v, lock);
 			#end
 			#end
+			if( o == null ) throw DEInvalidValue;
+			return o;
 		case MROpt(r) :
 		case MROpt(r) :
 			if( v == null )
 			if( v == null )
 				return null;
 				return null;