Skip to content

Commit

Permalink
fix(lib/api/native/modules): add new MMKVManager fallback
Browse files Browse the repository at this point in the history
Fixes support for Discord 256202+
  • Loading branch information
PalmDevs authored Nov 13, 2024
1 parent 6dd9f5c commit a68f137
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/api/native/modules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { RNModules } from "./types";

const nmp = window.nativeModuleProxy;

export const MMKVManager = nmp.MMKVManager as RNModules.MMKVManager;
export const MMKVManager = (nmp.NativeCacheModule ?? nmp.MMKVManager) as RNModules.MMKVManager;
export const FileManager = (nmp.NativeFileModule ?? nmp.RTNFileManager ?? nmp.DCDFileManager) as RNModules.FileManager;
export const ClientInfoManager = nmp.NativeClientInfoModule ?? nmp.RTNClientInfoManager ?? nmp.InfoDictionaryManager ;
export const DeviceManager = nmp.NativeDeviceModule ?? nmp.RTNDeviceManager ?? nmp.DCDDeviceManager;
Expand Down

0 comments on commit a68f137

Please sign in to comment.