fix for findImpl (#2390)

This commit is contained in:
alechkos 2023-08-10 07:24:06 +03:00 • committed by GitHub
commit 9b827541e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,6 +80,12 @@ exports.ExposeStore = (moduleRaidStr) => {
};
}
if (window.mR.findModule('ChatCollection')[0] && window.mR.findModule('ChatCollection')[0].ChatCollection) {
if (typeof window.mR.findModule('ChatCollection')[0].ChatCollection.findImpl === 'undefined' && typeof window.mR.findModule('ChatCollection')[0].ChatCollection._find != 'undefined') {
window.mR.findModule('ChatCollection')[0].ChatCollection.findImpl = window.mR.findModule('ChatCollection')[0].ChatCollection._find;
}
}
// TODO remove these once everybody has been updated to WWebJS with legacy sessions removed
const _linkPreview = window.mR.findModule('queryLinkPreview');
if (_linkPreview && _linkPreview[0] && _linkPreview[0].default) {