sheleoni / icecream-kana-game

A game for learning Japanese characters in the form of collecting ice-cream scoops. 🍦
https://icecream.sheleoni.com/
1 stars 0 forks source link

load tideLevel from database on /play ✍️ #63

Closed sheleoni closed 10 months ago

sheleoni commented 10 months ago

Goal

Steps

sheleoni commented 10 months ago

Problem

Demonstrating a "data fetch" error that returns undefined

Code

See at 82f484e

     console.log(character, 'this is a character')
     console.log(character.level, 'level')
     console.log(character.kana, 'kana')

would not work

character.level is undefined even though while the value of character.kana is successfully retrieved.

character level error

Possible Causes

Possible Solution

CleanShot 2023-12-19 at 21 32 25@2x apply JSON.stringify() to fetched record and then doing JSON.parse() on the stringified object.

  1. stringify
  2. parse

tada!

sheleoni commented 10 months ago

Problem

Maximum call-stack size exceeded (fixed at 18e2a3f)

Possible Causes

Possible Solution

sheleoni commented 10 months ago

We are now able to

Reproducing the Error

reproducing json error when fetching user data on logged-out state

Solved at

7292b35