Masth0 / ScratchCard

ScratchCard is a js lib to simulated a scratchcard in browser with html5 and canvas.
MIT License
153 stars 49 forks source link

(reading 'appendChild') #44

Open ayazwai opened 1 year ago

ayazwai commented 1 year ago

Hello, there is no problem when I create the cards 1 time, but when I try to create them the 2nd time, I get this error. Is there any way to destroy or delete previously created cards? I searched the system a bit but I couldn't find a way

scratchcard.min.js:1 Uncaught TypeError: Cannot read properties of null (reading 'appendChild') at t.value (scratchcard.min.js:1:21987) at new t (scratchcard.min.js:1:19107) at Object. (script.js:421:14) at Function.each (jquery.min.js:2:2777) at createScratchCards (script.js:415:7) at Object.success (script.js:235:17) at c (jquery.min.js:2:27742) at Object.fireWith [as resolveWith] (jquery.min.js:2:28487) at l (jquery.min.js:2:78789) at XMLHttpRequest. (jquery.min.js:2:81117)