Skip to content

Commit

Permalink
refactor: improve error message
Browse files Browse the repository at this point in the history
Provide more specific error messages to help identify the exact issue with the parameters.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
chessurisme and coderabbitai[bot] authored Aug 1, 2024
1 parent 9ea78b8 commit b137648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/utilities/add-event-listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { sanitizeValue } from '@utilities/sanitize-value'
*/
function addEventListeners(element, events) {
if (!validateParameters(element, events)) {
console.error('Cannot add event listeners! Check if the element or the events is valid.')
console.error('Cannot add event listeners! Invalid element or events parameter.')
return false
}

Expand Down

0 comments on commit b137648

Please sign in to comment.