Browse Source

refactor: add null check

pull/9784/head
Pranav C 1 week ago
parent
commit
3bfd6b0171
  1. 2
      packages/nc-gui/composables/useGlobal/actions.ts
  2. 2
      packages/nocodb/src/db/CustomKnex.ts

2
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 { Actions, AppInfo, Getters, State } from './types'
import type { NcProjectType } from '#imports' 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 isTokenUpdatedTab = useState('isTokenUpdatedTab', () => false)
const setIsMobileMode = (isMobileMode: boolean) => { const setIsMobileMode = (isMobileMode: boolean) => {

2
packages/nocodb/src/db/CustomKnex.ts

@ -991,6 +991,7 @@ function parseNestedCondition(obj, qb, pKey?, table?, tableAlias?) {
default: default:
// if object handle recursively // if object handle recursively
if ( if (
val &&
typeof val === 'object' && typeof val === 'object' &&
!(val instanceof Date) && !(val instanceof Date) &&
!Array.isArray(val) !Array.isArray(val)
@ -1252,6 +1253,7 @@ function parseNestedConditionv2(obj, qb, pKey?, table?, tableAlias?) {
default: default:
// if object handle recursively // if object handle recursively
if ( if (
val &&
typeof val === 'object' && typeof val === 'object' &&
!(val instanceof Date) && !(val instanceof Date) &&
!Array.isArray(val) !Array.isArray(val)

Loading…
Cancel
Save