Skip to content

Commit

Permalink
fix: Swal.getIcon() to work in jest environment (#2163)
Browse files Browse the repository at this point in the history
  • Loading branch information
limonte committed Feb 12, 2021
1 parent 76d8c36 commit eb3762c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/dom/getters.js
Expand Up @@ -21,7 +21,7 @@ export const getIcons = () => {
}

export const getIcon = () => {
const visibleIcon = getIcons().filter((icon) => isVisible(icon))
const visibleIcon = getIcons().filter((icon) => icon.style.display !== 'none')
return visibleIcon.length ? visibleIcon[0] : null
}

Expand Down
2 changes: 2 additions & 0 deletions sweetalert2.d.ts
Expand Up @@ -909,13 +909,15 @@ declare module 'sweetalert2' {

/**
* Set to `true` to disable buttons and show the loader instead of the Confirm button.
* Use it in combination with the `preConfirm` parameter.
*
* @default false
*/
showLoaderOnConfirm?: boolean;

/**
* Set to `true` to disable buttons and show the loader instead of the Deny button.
* Use it in combination with the `preDeny` parameter.
*
* @default false
*/
Expand Down

0 comments on commit eb3762c

Please sign in to comment.