mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-05 19:40:09 +00:00
fix: failsafes for stats null values
This commit is contained in:
parent
3fcb0732a4
commit
3b2808f0fd
@ -3171,13 +3171,15 @@ page.getStatistics = (params = {}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const data = response.data.stats[keys[i]][valKeys[j]]
|
const data = response.data.stats[keys[i]][valKeys[j]]
|
||||||
const type = (typeof data === 'object' && data.type) || 'auto'
|
const isDataObj = typeof data === 'object' && data
|
||||||
|
|
||||||
|
const type = (isDataObj && data.type) || 'auto'
|
||||||
// Skip hidden
|
// Skip hidden
|
||||||
if (type === 'hidden') {
|
if (type === 'hidden') {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
const value = typeof data === 'object' ? data.value : data
|
const value = isDataObj ? data.value : data
|
||||||
let parsed = void 0
|
let parsed = void 0
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -3243,7 +3245,7 @@ page.getStatistics = (params = {}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let keyAttrs = ''
|
let keyAttrs = ''
|
||||||
if (typeof data === 'object' && data.action) {
|
if (isDataObj && data.action) {
|
||||||
keyAttrs += ` data-action="${data.action}"`
|
keyAttrs += ` data-action="${data.action}"`
|
||||||
if (data.actionData) {
|
if (data.actionData) {
|
||||||
keyAttrs += ` data-action-data="${data.actionData}"`
|
keyAttrs += ` data-action-data="${data.actionData}"`
|
||||||
|
Loading…
Reference in New Issue
Block a user