From f19d76a08d6f6f7d5b078e07889f9809daaa4e25 Mon Sep 17 00:00:00 2001 From: gcanti Date: Tue, 8 Dec 2015 00:08:36 +0100 Subject: [PATCH] IE8 error with 'null' type, fix #17 --- CHANGELOG.md | 5 +++++ index.js | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0ae69e..208c606 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ **Note**: Gaps between patch versions are faulty/broken releases. +## v0.2.2 + +- **Bug Fix** + - IE8 error with 'null' type, fix #17 + ## v0.2.1 - **New Feature** diff --git a/index.js b/index.js index 5a49e57..3f7694c 100644 --- a/index.js +++ b/index.js @@ -107,7 +107,7 @@ var types = { return predicate ? t.subtype(t.Array, predicate) : t.Array; }, - null: function () { + 'null': function () { return util.Null; } @@ -133,7 +133,7 @@ function transform(s) { if (registerTypes.hasOwnProperty(type)) { return registerTypes[type]; } - + t.fail('[tcomb-json-schema] Unsupported json schema ' + t.stringify(s)); } diff --git a/package.json b/package.json index be25d8e..8ef5ab2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tcomb-json-schema", - "version": "0.2.1", + "version": "0.2.2", "description": "Transforms a JSON Schema to a tcomb type", "main": "index.js", "scripts": {