Display: Fix app notifier when there are no notifications from legacy

pull/5156/head
Angel Fernando Quiroz Campos 2 years ago
parent 6d9548a117
commit 7dba2df37b
  1. 10
      assets/vue/App.vue

@ -143,11 +143,13 @@ onUpdated(() => {
const flashes = JSON.parse(app.dataset.flashes)
for (const key in flashes) {
const notificationType = key === 'danger' ? 'Error' : capitalize(key);
if (!Array.isArray(flashes)) {
for (const key in flashes) {
const notificationType = key === 'danger' ? 'Error' : capitalize(key);
for (const flashText of flashes[key]) {
notification[`show${notificationType}Notification`](flashText);
for (const flashText of flashes[key]) {
notification[`show${notificationType}Notification`](flashText);
}
}
}

Loading…
Cancel
Save