Skip to content

Commit

Permalink
fix: Error connect
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalan7 committed Oct 28, 2021
1 parent a945c7c commit e15a018
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
4 changes: 3 additions & 1 deletion src/lib/wapi/store/get-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export async function getStore(modules) {
}

let neededStore = neededObjects.find((needObj) => needObj.id === 'Store');
window.Store = neededStore.foundedModule ? neededStore.foundedModule : {};
if (neededStore) {
window.Store = neededStore.foundedModule ? neededStore.foundedModule : {};
}
neededObjects.splice(neededObjects.indexOf(neededStore), 1);

neededObjects.forEach((needObj) => {
Expand Down
10 changes: 0 additions & 10 deletions src/lib/wapi/store/store-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,16 +296,6 @@ export const storeObjects = [
? module
: null
},
{
id: 'Versions',
conditions: (module) =>
module.loadProtoVersions &&
module.default['15'] &&
module.default['16'] &&
module.default['17']
? module
: null
},
{
id: 'Sticker',
conditions: (module) =>
Expand Down
7 changes: 4 additions & 3 deletions src/lib/wapi/wapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,11 @@ var loadParasite = function () {
try {
const last = window['webpackChunkwhatsapp_web_client'].length - 1;
if (
!/^parasite/.test(
window['webpackChunkwhatsapp_web_client'][last][0][0]
!window['webpackChunkwhatsapp_web_client'][last][0].includes(
'parasite'
) &&
(document.querySelectorAll('#app .two').length ||
(document.querySelectorAll('#app').length ||
document.querySelectorAll('#app .two').length ||
document.querySelector('canvas') ||
document.querySelectorAll('#startup').length == 0)
) {
Expand Down

4 comments on commit e15a018

@jonalan7
Copy link
Contributor Author

@jonalan7 jonalan7 commented on e15a018 Oct 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisk8er
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @jonalan7

@barguti
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @jonalan7 👍😀

@renzoveliz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love you, te amo.

Please sign in to comment.