src/index.js
function unwrapItems(schema) {
    if (_.isEmpty(schema.items))
      schema.items = {};
    else {
      assert(_.isPlainObject(schema.items[0]));
      schema.items = schema.items[0];
    }

    return schema;
  }
function unwrapItems(schema) {
    if (_.isEmpty(schema.items))
      schema.items = {};
    else {
      assert(_.isPlainObject(schema.items[0]));
      schema.items = schema.items[0];
    }

    return schema;
  }
function unwrapItems ( schema ) { if ( _ . isEmpty ( schema . items ) ) schema . items = { } ; else { assert ( _ . isPlainObject ( schema . items [ 0 ] ) ) ; schema . items = schema . items [ 0 ] ; } return schema ; }
Fix case then 'items' value is empty or single element array.
Fix case then items value is empty or single element array .