Chakroun-Anas / turbo-console-log

588 stars 140 forks source link

The generated position is incorrect. #218

Closed vttilaxuqdo0854 closed 1 year ago

vttilaxuqdo0854 commented 1 year ago

I encountered some issues while using it. I hope you can help me take a look. Thank you.

image

const [curSopTask, setCurSopTask] = useState<ISopTaskClassTodayTaskClassIdRes | null>(null)
  const [sopTasks, setSopTasks] = useState<ISopTaskClassTodayTaskClassIdRes[]>([])
  useEffect(() => {
    async function api() {
      try {
        const res = await sopTaskClassTodayTaskClassId(currentUserClass!.classId)
        if (!res.data.success) {
          throw new Error(res.data.msg)
        }
        setSopTasks(res.data?.data || [])
        setCurSopTask(res.data?.data?.[0] || null)
      } catch (error) {
        console.error(error)
      }
        console.log("🚀 ~ file: index.tsx:28 ~ api ~ res.data?.data?.[0]:", res.data?.data?.[0])
    }
    currentUserClass?.classId && api()
  }, [currentUserClass])
Chakroun-Anas commented 1 year ago

Hello,

Thank you so much for sharing the bug with us, i just pushed a fix (v2.9.4) that deals with, would you kindly test the resolution and report back any other problematic scenarios with a code snippet for each scenario so that we deal with them also ^^

pvaladez commented 5 months ago

I've been seeing this exact problem for the last several weeks / month. It often puts the console.log() many lines down from where the variable is.