Skip to content

Commit

Permalink
fix(binding): nothing to persist handling
Browse files Browse the repository at this point in the history
  • Loading branch information
matej21 committed Jun 7, 2024
1 parent 2da747d commit f893110
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/binding/src/core/DataBinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class DataBinding<Node> {
const generator = new MutationGenerator(this.treeStore, this.queryBuilder)
const mutationResult = generator.getPersistMutation()

if (mutationResult === undefined) {
if (mutationResult.operations.length === 0) {
await this.processEmptyPersistMutation(onPersistSuccess)
return {
type: 'nothingToPersist',
Expand Down
2 changes: 1 addition & 1 deletion packages/binding/src/core/MutationGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class MutationGenerator {
) {
}

public getPersistMutation(): PersistMutationResult | undefined {
public getPersistMutation(): PersistMutationResult {
const mutations: Record<string, ContentMutation<any>> = {}
const operations: SubMutationOperation[] = []
const processedPlaceholdersByEntity: ProcessedPlaceholdersByEntity = new Map()
Expand Down

0 comments on commit f893110

Please sign in to comment.