Fix: Use default reaction on bootstrap (#3965)

This commit is contained in:
Tiago Vasconcelos
2026-05-14 04:56:41 +02:00
committed by GitHub
parent 810a13722c
commit c9c68bd8d7
2 changed files with 7 additions and 6 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -5
View File
@@ -1,16 +1,17 @@
function eventReaction(amount) { function eventReaction(amount) {
localUrl = '' localUrl = ''
reaction = localStorage.getItem('lnbits.reactions') const reaction =
if (!reaction || reaction === 'None') { Quasar.LocalStorage.getItem('lnbits.reactions') || SETTINGS.defaultReaction
if (!reaction || reaction.toLowerCase() === 'none') {
return return
} }
try { try {
if (amount < 0) { if (amount < 0) {
return return
} }
reaction = localStorage.getItem('lnbits.reactions') if (typeof window[reaction] === 'function') {
if (reaction) { window[reaction]()
window[reaction.split('|')[1]]()
} }
} catch (e) { } catch (e) {
console.log(e) console.log(e)