Skip to content

Commit

Permalink
fix: clear flash messages after rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Nov 28, 2023
1 parent 37c3345 commit 4cd857f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/flash.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,11 @@ module.exports = () => {

if (steps.length > 0) Swal.queue(steps);
}

// clear window._messages
window._messages = {};

// delete script tag that contained messages
// (e.g. in case we generate passwords in `_messages`)
$('#flash-messages').remove();
};

0 comments on commit 4cd857f

Please sign in to comment.