mirror of
https://github.com/HolographicHat/Yae.git
synced 2025-12-13 18:08:15 +08:00
fix crash when appcenter error
This commit is contained in:
20
appcenter.js
20
appcenter.js
@@ -57,17 +57,15 @@ const device = (() => {
|
||||
|
||||
const upload = () => {
|
||||
if (queue.length > 0) {
|
||||
try {
|
||||
const data = JSON.stringify({ "logs": queue })
|
||||
axios.post("https://in.appcenter.ms/logs?api-version=1.0.0", data,{
|
||||
headers: {
|
||||
"App-Secret": key,
|
||||
"Install-ID": install
|
||||
}
|
||||
}).then(_ => {
|
||||
queue.length = 0
|
||||
})
|
||||
} catch (e) {}
|
||||
const data = JSON.stringify({ "logs": queue })
|
||||
axios.post("https://in.appcenter.ms/logs?api-version=1.0.0", data,{
|
||||
headers: {
|
||||
"App-Secret": key,
|
||||
"Install-ID": install
|
||||
}
|
||||
}).then(_ => {
|
||||
queue.length = 0
|
||||
}).catch(_ => {})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user