Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewm-mitchells committed Sep 30, 2024
1 parent 0e7b206 commit 899f164
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/assets/javascripts/spree/backend/global/alerts.es6
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ function show_flash(type, message) {
function appendToFlashAlertsContainer (message, type) {
if (type === 'info') type = 'notice'

const parnetNode = document.querySelector('#FlashAlertsContainer')
const parentNode = document.querySelector('#FlashAlertsContainer')
const node = document.createElement('SPAN');
const textNode = document.createTextNode(message);

// Only the most recent alert should be left in the #FlashAlertsContainer.
parnetNode.innerHTML = ''
parentNode.innerHTML = ''

node.classList.add('d-none')
node.setAttribute('data-alert-type', type);
node.appendChild(textNode)

parnetNode.appendChild(node);
parentNode.appendChild(node);
}

0 comments on commit 899f164

Please sign in to comment.