Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}