Permalink
Browse files

remove the option - no files is null otherwise array

  • Loading branch information...
cloudshift committed Feb 27, 2012
1 parent 74da0af commit 5906e2373c642ec179f1a97d3f6dc72e6d0c2f10
Showing with 2 additions and 5 deletions.
  1. +1 −1 cloudshift/Http.hx
  2. +1 −4 cloudshift/http/HttpImpl.hx
View
@@ -13,7 +13,7 @@ typedef TUploadFile = {
}
typedef THandler = EReg->NodeHttpServerReq->NodeHttpServerResp->Void;
-typedef TFiles = Option<Array<{field:String,file:TUploadFile}>>;
+typedef TFiles = Array<{field:String,file:TUploadFile}>;
typedef TFields = Hash<String>->TFiles->Void;
@@ -169,10 +169,7 @@ class HttpImpl implements HttpServer,implements Part<HostPort,HttpServer,HttpEve
files.push({field:field,file:file});
})
.on('end', function() {
- var
- fls = (files != null && files.length > 0) ? Some(files) : None;
-
- cb(fields,fls);
+ cb(fields,files);
});
form.parse(req);
}

0 comments on commit 5906e23

Please sign in to comment.