From 670335f3f4faa9516e0cfa536659d0c320ce2810 Mon Sep 17 00:00:00 2001 From: alechkos <93551621+alechkos@users.noreply.github.com> Date: Wed, 11 Oct 2023 17:54:28 +0300 Subject: [PATCH] hotfix-findImpl (#2578) --- src/util/Injected.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index fc99b1d..d94588a 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -62,7 +62,6 @@ exports.ExposeStore = (moduleRaidStr) => { /* 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.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 */ window.Store.StickerTools = { @@ -100,6 +99,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 const _linkPreview = window.mR.findModule('queryLinkPreview');