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

Include tagName when providing invalid attr value and class name when defining invalid attrsSchema #103

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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

@@ -572,7 +572,7 @@ class Component extends WebComponent {
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
@@ -571,8 +571,9 @@ class Component extends WebComponent {
// 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.

None yet

2 participants