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) {
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user