Fix: Use default reaction on bootstrap (#3965)
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,16 +1,17 @@
|
||||
function eventReaction(amount) {
|
||||
localUrl = ''
|
||||
reaction = localStorage.getItem('lnbits.reactions')
|
||||
if (!reaction || reaction === 'None') {
|
||||
const reaction =
|
||||
Quasar.LocalStorage.getItem('lnbits.reactions') || SETTINGS.defaultReaction
|
||||
if (!reaction || reaction.toLowerCase() === 'none') {
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
if (amount < 0) {
|
||||
return
|
||||
}
|
||||
reaction = localStorage.getItem('lnbits.reactions')
|
||||
if (reaction) {
|
||||
window[reaction.split('|')[1]]()
|
||||
if (typeof window[reaction] === 'function') {
|
||||
window[reaction]()
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
|
||||
Reference in New Issue
Block a user