Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #681: Warn on invalid array schema provided. #684

Merged
merged 3 commits into from
Aug 28, 2017

Conversation

n1k0
Copy link
Collaborator

@n1k0 n1k0 commented Aug 28, 2017

Fix #681.

I've also updated the UnsupportedField component to provide more details:

Invalid array schema:

Invalid schema type:

@n1k0 n1k0 merged commit 8ea28ca into master Aug 28, 2017
@n1k0 n1k0 deleted the 681-warn-on-arrays-without-items branch August 28, 2017 14:21
@glasserc
Copy link
Contributor

glasserc commented Sep 6, 2017

Released in v0.50.0.

@llamamoray
Copy link
Collaborator

@glasserc This change looks like it's part of the tagged commit 0.50.0, but the npm package doesn't seem to have the changed.

This is the code I see in the published lib/components/fields/UnsupportedField.js:

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = UnsupportedField;

var _react = require("react");

var _react2 = _interopRequireDefault(_react);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function UnsupportedField(_ref) {
  var schema = _ref.schema;

  // XXX render json as string so dev can inspect faulty subschema
  return _react2.default.createElement(
    "div",
    { className: "unsupported-field" },
    "Unsupported field schema ",
    JSON.stringify(schema, null, 2),
    "."
  );
}

Has something odd happened with the publish, or is it something local?

@glasserc
Copy link
Contributor

glasserc commented Sep 7, 2017

Oops, you're right, I published a bad version. I guess I should document how to release a version, since I keep forgetting. I've just pushed v0.50.1, can you tell me if that works correctly?

@llamamoray
Copy link
Collaborator

0.50.1 looks good. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants