From d81b74324db45c7293e3a53e79d804ac92f88a30 Mon Sep 17 00:00:00 2001 From: Shir Serlui <70711723+shirser121@users.noreply.github.com> Date: Fri, 1 Dec 2023 07:43:16 +0200 Subject: [PATCH] fix: window.Store.getMsgInfo is not a function (#2651) * Fix window.Store.getMsgInfo is not a function * Unneccery code removed --- src/util/Injected.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index 7109f7d..d6ebeeb 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -61,7 +61,7 @@ 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]; - window.Store.getMsgInfo = m = window.mR.findModule('sendQueryMsgInfo')[0] ? m.sendQueryMsgInfo : window.mR.findModule('queryMsgInfo')[0].queryMsgInfo; + window.Store.getMsgInfo = (window.mR.findModule('sendQueryMsgInfo')[0] || {}).sendQueryMsgInfo || window.mR.findModule('queryMsgInfo')[0].queryMsgInfo; /* eslint-enable no-undef, no-cond-assign */ window.Store.Settings = {