Skip to content

Commit

Permalink
Ensure events have doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
bjester committed May 23, 2024
1 parent 81d1c5b commit 1e3f048
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/KImg/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@
*/
onError(event) {
if (this.$listeners && this.$listeners.error) {
/**
* Emitted when the image fails to load or a misconfiguration error occurs. Expect either an `Event` or `Error`
*/
this.$emit('error', event);
} else {
// eslint-disable-next-line no-console
Expand Down
3 changes: 3 additions & 0 deletions lib/tabs/tabsMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ export default {
// Delegate error message to @error listener or `console.error` as fallback
const e = new Error(`[${this.$options.name}] Missing 'ariaLabel' or 'ariaLabelledBy'`);
if (this.$listeners && this.$listeners.error) {
/**
* Emitted with an error when a misconfiguration error occurs, if a listener is attached
*/
this.$emit('error', e);
} else {
// eslint-disable-next-line no-console
Expand Down

0 comments on commit 1e3f048

Please sign in to comment.