Merge pull request #5128 from christianbeeznest/fix-flashbag

Internal: Map 'danger' to 'error' for flash notifications - refs BT#21198
ofaj2
christianbeeznest 2 years ago committed by GitHub
commit 307fbb548b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      assets/vue/App.vue

@ -138,10 +138,10 @@ onUpdated(() => {
const flashes = JSON.parse(app.dataset.flashes)
for (const key in flashes) {
let capitalKey = capitalize(key)
const notificationType = key === 'danger' ? 'Error' : capitalize(key);
for (const flashText in flashes[key]) {
notification[`show${capitalKey}Notification`](flashes[key][flashText])
for (const flashText of flashes[key]) {
notification[`show${notificationType}Notification`](flashText);
}
}

Loading…
Cancel
Save