We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc93395 commit edcb3c7Copy full SHA for edcb3c7
1 file changed
src/hooks/allCardsReady.js
@@ -2,14 +2,14 @@ import eventManager from '../utils/eventManager.js';
2
import { global } from '../utils/global.js';
3
4
eventManager.on(':loaded', () => {
5
- function call(cards = global('allCards')) {
+ function call(cards) {
6
eventManager.singleton.emit('allCardsReady', cards);
7
}
8
const allCards = global('allCards', {
9
throws: false,
10
});
11
if (!allCards || !allCards.length) {
12
- document.addEventListener('allCardsReady', call);
+ document.addEventListener('allCardsReady', () => call(global('allCards')));
13
} else {
14
call(allCards);
15
0 commit comments