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

Update error messages in decluttering-card.ts #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/decluttering-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ class DeclutteringCard extends LitElement {
if (!templateConfig) {
throw new Error(`The template "${config.template}" doesn't exist in decluttering_templates`);
} else if (!(templateConfig.card || templateConfig.element)) {
throw new Error('You shoud define either a card or an element in the template');
throw new Error('You should define either a card or an element in the template');
} else if (templateConfig.card && templateConfig.element) {
throw new Error('You can define a card and an element in the template');
throw new Error('You cannot define a card and an element in the template');
}
this._ro = new ResizeObserver(() => {
this._displayHidden();
Expand Down