Browse Source

Fix (exception if no cookie defined)

Pascal Peridont 18 years ago
parent
commit
8b5ef80663
1 changed files with 2 additions and 0 deletions
  1. 2 0
      std/js/Cookie.hx

+ 2 - 0
std/js/Cookie.hx

@@ -29,6 +29,8 @@ class Cookie {
 		for( e in a ){
 		for( e in a ){
 			e = StringTools.ltrim(e);
 			e = StringTools.ltrim(e);
 			var t = e.split("=");
 			var t = e.split("=");
+			if( t.length < 2 )
+				continue;
 			h.set(t[0],StringTools.urlDecode(t[1]));
 			h.set(t[0],StringTools.urlDecode(t[1]));
 		}
 		}
 		return h;
 		return h;