fix-#2056:Added null checking using Vanilla JS
This commit is contained in:
parent
3738d7dfd4
commit
c01783c862
@ -3,7 +3,7 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"dev": "next dev -p 3030",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
@ -20,7 +20,6 @@
|
||||
"i18next": "^21.9.2",
|
||||
"js-yaml": "^4.1.0",
|
||||
"json-rpc-2.0": "^1.4.1",
|
||||
"lodash": "^4.17.21",
|
||||
"memory-cache": "^0.2.0",
|
||||
"minecraft-ping-js": "^1.0.2",
|
||||
"next": "^12.3.1",
|
||||
|
||||
@ -35,9 +35,6 @@ dependencies:
|
||||
json-rpc-2.0:
|
||||
specifier: ^1.4.1
|
||||
version: 1.5.1
|
||||
lodash:
|
||||
specifier: ^4.17.21
|
||||
version: 4.17.21
|
||||
memory-cache:
|
||||
specifier: ^0.2.0
|
||||
version: 0.2.0
|
||||
|
||||
@ -17,7 +17,7 @@ export default function Disk({ options, expanded, refresh = 1500 }) {
|
||||
return <Error options={options} />
|
||||
}
|
||||
|
||||
if (_.isEmpty(data)) {
|
||||
if (!data || Object.keys(data).length === 0) {
|
||||
return <Resource
|
||||
icon={FiHardDrive}
|
||||
value="-"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user