Skip to content

Commit

Permalink
fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Aug 30, 2023
1 parent 4202e32 commit 04eefc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/MMKVNative.mm
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ void upgradeIndex(MMKV *kv, NSString * type) {
if (![kv containsKey:type]) return;
NSMutableArray *array = [kv getObjectOfClass:NSMutableArray.class forKey:type];
if (array.count) {
NSDictionary *dic = [NSDictionary dictionary];
NSMutableDictionary *dic = [NSMutableDictionary dictionary];
for (int i=0;i < array.count;i++) {
[dic setValue:0 forKey:array[i]];
[dic setValue:@1 forKey:array[i]];
}
[kv setObject:dic forKey:type];
}
Expand Down

0 comments on commit 04eefc1

Please sign in to comment.