Skip to content

Commit 252dda1

Browse files
committed
2 parents 80e0f14 + 5b68f23 commit 252dda1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

android/src/main/java/com/ammarahmed/mmkv/RNMMKVModule.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ public void getAllMMKVInstanceIDs(Promise promise) {
187187
HashMap<String, Object> allIDs = IdStore.getAll();
188188

189189
WritableArray array = Arguments.createArray();
190+
191+
if (allIDs == null) {
192+
promise.resolve(array);
193+
return;
194+
}
195+
190196
for (String string : allIDs.keySet()) {
191197
array.pushString(string);
192198
}

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ declare module MMKVStorage {
226226
* Get all MMKV Instance IDs.
227227
*
228228
*/
229-
getAllMMKVInstanceIDs(): Promise<object>;
229+
getAllMMKVInstanceIDs(): Promise<Array<string>>;
230230

231231
/**
232232
*

0 commit comments

Comments
 (0)