mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-20 04:29:15 +00:00
optionally patch _find function if it's not found
This commit is contained in:
@@ -38,12 +38,14 @@ exports.ExposeStore = (moduleRaidStr) => {
|
|||||||
window.Store.DownloadManager = window.mR.findModule('DownloadManager')[0].default;
|
window.Store.DownloadManager = window.mR.findModule('DownloadManager')[0].default;
|
||||||
window.Store.Call = window.mR.findModule('CallCollection')[0].default;
|
window.Store.Call = window.mR.findModule('CallCollection')[0].default;
|
||||||
|
|
||||||
window.Store.Chat._find = e => {
|
if(!window.Store.Chat._find) {
|
||||||
const target = window.Store.Chat.get(e);
|
window.Store.Chat._find = e => {
|
||||||
return target ? Promise.resolve(target) : Promise.resolve({
|
const target = window.Store.Chat.get(e);
|
||||||
id: e
|
return target ? Promise.resolve(target) : Promise.resolve({
|
||||||
});
|
id: e
|
||||||
};
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.LoadUtils = () => {
|
exports.LoadUtils = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user