Skip to content

Conversation

@jakewski
Copy link
Contributor

No description provided.

Copy link
Member

@tdumitrescu tdumitrescu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's a test to fix

// Ensure attr type is valid
const attrType = attrSchema.type;
if (!ATTR_TYPE_DEFAULTS.hasOwnProperty(attrType)) {
throw new Error(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new Error(
this._logError(`attrsSchema error in`, this);
throw new Error(

@jakewski jakewski changed the title Include tagName when providing bad attr Include tagName when providing invalid attr value and class name when defining invalid attrsSchema Aug 21, 2020
lib/component.js Outdated
// Ensure attr type is valid
const attrType = attrSchema.type;
if (!ATTR_TYPE_DEFAULTS.hasOwnProperty(attrType)) {
this._logError(`attrsSchema definition error in`, this);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure _logError would still be useful in this situation since it will always throw on initialization

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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.

4 participants