Skip to content

Commit edcb3c7

Browse files
committed
fix: allCards loading wrong value
1 parent dc93395 commit edcb3c7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/hooks/allCardsReady.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import eventManager from '../utils/eventManager.js';
22
import { global } from '../utils/global.js';
33

44
eventManager.on(':loaded', () => {
5-
function call(cards = global('allCards')) {
5+
function call(cards) {
66
eventManager.singleton.emit('allCardsReady', cards);
77
}
88
const allCards = global('allCards', {
99
throws: false,
1010
});
1111
if (!allCards || !allCards.length) {
12-
document.addEventListener('allCardsReady', call);
12+
document.addEventListener('allCardsReady', () => call(global('allCards')));
1313
} else {
1414
call(allCards);
1515
}

0 commit comments

Comments
 (0)