Skip to content

Commit

Permalink
fix: index overwritten when removing key
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed May 11, 2022
1 parent f9b4e78 commit 84b9454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion android/src/main/rnmmkv/rnmmkv-adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static bool updateIndex(MMKV *const kv, const string &idx, const string &key)
auto it = find(indexes.begin(), indexes.end(), key);
if (it != indexes.end()) {
indexes.erase(it);
kv->set(indexes, "stringIndex");
kv->set(indexes, idx);
return true;
}
return false;
Expand Down

1 comment on commit 84b9454

@vercel
Copy link

@vercel vercel bot commented on 84b9454 May 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

rnmmkv – ./

rnmmkv-ammarahm-ed.vercel.app
rnmmkv-git-master-ammarahm-ed.vercel.app
rnmmkv.vercel.app

Please sign in to comment.