richardschneider/cardsJS

Cannot empty hands/fans

simo1994 opened this issue · 0 comments

Hello,
when the observable element is emptied, the hand or fan visualization will continue to display the last card that was present in it.
This can be easily resolved by modifying the function addCardImages(hand, cards) in this way, adding an hand.empty(); call.

        if (!cards) {
		hand.empty();
		return;
        }

If you fix this problem, please create a new version number so the CDN hosted version will be updated too.