Comparing version 0.2.6 to 0.2.7
@@ -1,2 +0,2 @@ | ||
// flowcheck 0.2.5 | ||
// flowcheck 0.2.7 | ||
// https://github.com/gcanti/flowcheck | ||
@@ -224,9 +224,9 @@ // (c) 2015 Giulio Canti <giulio.canti@gmail.com> | ||
var type = new Type(name, function (x, ctx) { | ||
ctx = (ctx || []).concat(name); | ||
if (types.some(function (type) { | ||
return type.is(x); | ||
return validate(x, type, ctx, true) === null; | ||
})) { | ||
return null; | ||
} | ||
ctx = ctx || []; | ||
return [new Failure(x, type, ctx.concat(name))]; | ||
return [new Failure(x, type, ctx)]; | ||
}); | ||
@@ -233,0 +233,0 @@ return type; |
@@ -13,2 +13,7 @@ # Changelog | ||
## v0.2.7 | ||
- **Bug Fix** | ||
+ "type.is is not a function" when using constructor function with assert.union #21 (thanks @ivan) | ||
## v0.2.6 | ||
@@ -15,0 +20,0 @@ |
{ | ||
"name": "flowcheck", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"description": "Runtime type checking for Flow", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
27247