Skip to content

fix document_ref.set function for SetOption working#29

Open
hi-jin wants to merge 1 commit intochuyentt:masterfrom
hi-jin:set-option
Open

fix document_ref.set function for SetOption working#29
hi-jin wants to merge 1 commit intochuyentt:masterfrom
hi-jin:set-option

Conversation

@hi-jin
Copy link

@hi-jin hi-jin commented Sep 23, 2023

Hi, I'm a mobile application developer using your localstore library!
This is a pull request for better functionality.

Before this commit

document_ref.set(
    {
        "data": "something",
    },
    SetOption(merge: true),
);

doesn't work.
Because _data doesn't have the document data.
So empty Map + {"data": "something"} just go into the existing doc. (In fact, this is merge: false)

After this commit

SetOption works properly.

Related Issue

Closes #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SetOption(merge: true) not working

1 participant