From 3bfd6b0171ca967c1da04ae64ec2d845682f03b8 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 13 Nov 2024 07:30:19 +0000 Subject: [PATCH] refactor: add null check --- packages/nc-gui/composables/useGlobal/actions.ts | 2 +- packages/nocodb/src/db/CustomKnex.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/composables/useGlobal/actions.ts b/packages/nc-gui/composables/useGlobal/actions.ts index 46aa0a702f..f8b4d4405e 100644 --- a/packages/nc-gui/composables/useGlobal/actions.ts +++ b/packages/nc-gui/composables/useGlobal/actions.ts @@ -2,7 +2,7 @@ import { getActivePinia } from 'pinia' import type { Actions, AppInfo, Getters, State } from './types' import type { NcProjectType } from '#imports' -export function useGlobalActions(state: State, getters: Getters): Actions { +export function useGlobalActions(state: State, _getters: Getters): Actions { const isTokenUpdatedTab = useState('isTokenUpdatedTab', () => false) const setIsMobileMode = (isMobileMode: boolean) => { diff --git a/packages/nocodb/src/db/CustomKnex.ts b/packages/nocodb/src/db/CustomKnex.ts index 0a012cf987..48555bcbb6 100644 --- a/packages/nocodb/src/db/CustomKnex.ts +++ b/packages/nocodb/src/db/CustomKnex.ts @@ -991,6 +991,7 @@ function parseNestedCondition(obj, qb, pKey?, table?, tableAlias?) { default: // if object handle recursively if ( + val && typeof val === 'object' && !(val instanceof Date) && !Array.isArray(val) @@ -1252,6 +1253,7 @@ function parseNestedConditionv2(obj, qb, pKey?, table?, tableAlias?) { default: // if object handle recursively if ( + val && typeof val === 'object' && !(val instanceof Date) && !Array.isArray(val)