hotfix-findImpl (#2578)

This commit is contained in:
alechkos 2023-10-11 17:54:28 +03:00 • committed by GitHub
commit 670335f3f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,6 @@ exports.ExposeStore = (moduleRaidStr) => {
/* eslint-disable no-undef, no-cond-assign */ /* eslint-disable no-undef, no-cond-assign */
window.Store.QueryExist = ((m = window.mR.findModule('queryExists')[0]) ? m.queryExists : window.mR.findModule('queryExist')[0].queryWidExists); window.Store.QueryExist = ((m = window.mR.findModule('queryExists')[0]) ? m.queryExists : window.mR.findModule('queryExist')[0].queryWidExists);
window.Store.ReplyUtils = (m = window.mR.findModule('canReplyMsg')).length > 0 && m[0]; window.Store.ReplyUtils = (m = window.mR.findModule('canReplyMsg')).length > 0 && m[0];
if ((m = window.mR.findModule('ChatCollection')[0]) && m.ChatCollection && typeof m.ChatCollection.findImpl === 'undefined' && typeof m.ChatCollection._find !== 'undefined') m.ChatCollection.findImpl = m.ChatCollection._find;
/* eslint-enable no-undef, no-cond-assign */ /* eslint-enable no-undef, no-cond-assign */
window.Store.StickerTools = { window.Store.StickerTools = {
@ -101,6 +100,9 @@ exports.ExposeStore = (moduleRaidStr) => {
}; };
} }
// eslint-disable-next-line no-undef
if ((m = window.mR.findModule('ChatCollection')[0]) && m.ChatCollection && typeof m.ChatCollection.findImpl === 'undefined' && typeof m.ChatCollection._find !== 'undefined') m.ChatCollection.findImpl = m.ChatCollection._find;
// TODO remove these once everybody has been updated to WWebJS with legacy sessions removed // TODO remove these once everybody has been updated to WWebJS with legacy sessions removed
const _linkPreview = window.mR.findModule('queryLinkPreview'); const _linkPreview = window.mR.findModule('queryLinkPreview');
if (_linkPreview && _linkPreview[0] && _linkPreview[0].default) { if (_linkPreview && _linkPreview[0] && _linkPreview[0].default) {