-
Notifications
You must be signed in to change notification settings - Fork 33
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new Error( | |
this._logError(`attrsSchema error in`, this); | |
throw new Error( |
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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.