We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad07207 commit bf65045Copy full SHA for bf65045
main.js
@@ -30,6 +30,11 @@ GoDice.prototype.onDiceConnected = (diceId, diceInstance) => {
30
// get new die element or it's instance if it's already exists
31
const diceHtmlEl = getDiceHtmlEl(diceId);
32
33
+ // clear existing die element content if it exists
34
+ while (diceHtmlEl.firstChild) {
35
+ diceHtmlEl.removeChild(diceHtmlEl.lastChild);
36
+ }
37
+
38
// get die host from html, where we will put our connected dices
39
const diceHost = document.getElementById("dice-host");
40
0 commit comments