Skip to content

Commit

Permalink
CB-5160 adjust set to null behaviour (#2648)
Browse files Browse the repository at this point in the history
Co-authored-by: Evgenia Bezborodova <[email protected]>
  • Loading branch information
devnaumov and EvgeniaBzzz authored May 22, 2024
1 parent e05dafd commit 1e599fd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { action, makeObservable, observable } from 'mobx';

import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor';
import { ResultDataFormat, SqlResultRow, UpdateResultsDataBatchMutationVariables } from '@cloudbeaver/core-sdk';
import { isNull } from '@cloudbeaver/core-utils';

import type { IDatabaseDataSource } from '../../IDatabaseDataSource';
import type { IDatabaseResultSet } from '../../IDatabaseResultSet';
Expand Down Expand Up @@ -142,7 +143,7 @@ export class ResultSetEditAction extends DatabaseEditAction<IResultSetElementKey
const prevValue = update.source?.[key.column.index] as any;

if (isResultSetContentValue(prevValue) && !isResultSetComplexValue(value)) {
if ('text' in prevValue) {
if ('text' in prevValue && !isNull(value)) {
value = createResultSetContentValue({
text: String(value),
contentLength: String(value).length,
Expand Down

0 comments on commit 1e599fd

Please sign in to comment.