pi-ebb 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -707,8 +707,8 @@ var createSession = () => {
|
|
|
707
707
|
const endTurn = async (host) => {
|
|
708
708
|
if (!band.isRevealed) await showNextCard(host, void 0, true);
|
|
709
709
|
};
|
|
710
|
-
/** What the band draws now
|
|
711
|
-
const bandView = async (host
|
|
710
|
+
/** What the band draws now. A reader on every render: it never throws. */
|
|
711
|
+
const bandView = async (host) => {
|
|
712
712
|
let data;
|
|
713
713
|
try {
|
|
714
714
|
data = await load(host);
|
|
@@ -719,13 +719,13 @@ var createSession = () => {
|
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
721
|
if (!Object.keys(data.decks).length) return { kind: "no-deck" };
|
|
722
|
-
const card =
|
|
722
|
+
const card = band.cardId ? data.cards[band.cardId] : void 0;
|
|
723
723
|
const f = card && face(data, card);
|
|
724
724
|
if ((data.meta.pausedUntil ?? 0) > Date.now() || !f) return { kind: "none" };
|
|
725
725
|
return {
|
|
726
726
|
kind: "card",
|
|
727
727
|
face: f,
|
|
728
|
-
isRevealed:
|
|
728
|
+
isRevealed: band.isRevealed
|
|
729
729
|
};
|
|
730
730
|
};
|
|
731
731
|
/**
|