fix falsy check of response

This commit is contained in:
Adarsh Lilha 2023-11-25 14:19:41 +05:30
parent f0d5cdecb7
commit fb8277f03e
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ import { useEffect } from 'react';
import { useTheme } from 'providers/Theme/index';
const formatResponse = (data, mode) => {
if (!data) {
if (data === undefined) {
return '';
}

View File

@ -38,7 +38,7 @@ export const safeParseJSON = (str) => {
};
export const safeStringifyJSON = (obj, indent = false) => {
if (!obj) {
if (obj === undefined) {
return obj;
}
try {