WillFlame14 / hanabi-bot

A bot that plays on the hanab.live interface.
GNU General Public License v3.0
14 stars 9 forks source link

Avoid recursive clue object by cloning clue. #325

Closed flackr closed 2 weeks ago

flackr commented 2 weeks ago

Fixes #323

flackr commented 2 weeks ago

Can we merge this or one of the other ways of fixing the issue I suggested at https://github.com/WillFlame14/hanabi-bot/issues/323#issuecomment-2221659985 ?

I hope I explained there adequately why this fixes both stack overflow issues.

flackr commented 2 weeks ago

I readded the JSON.stringify that was originally failing when landing d101a55ed54fd3d5bfc6a5828c13ea17176c7038 which set the last_action, as it actually caught this recursive reference so it seems like it will help prevent such recursive references from being added - admittedly indirectly.