Open camdendotlol opened 7 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
topstersorg | ✅ Ready (Inspect) | Visit Preview | Jan 31, 2024 1:10am |
Works great on Safari. Firefox and Chrome both go into an infinite loop:
renderChart()
, which writes the current chart state to localStorage.It seems like Safari has an efficiency check where it doesn't do anything if the old localStorage value equals the new value, while Firefox/Chrome don't have that. Big win for Safari here.
The way to fix this is for this particular mutation to not trigger a write to localStorage. We are, after all, just reading from localStorage in the wake of another tab's changes. I tried setting a new setEntireChartWithoutLocalStorage
variant of setEntireChart
and watching for that in ChartCanvas.vue
, but it seems like another render is triggered shortly after that first one and writes to localStorage anyway. This points to a deeper issue in the chart Canvas logic that ties into #13 - the chart renders too many times.
Closes #35
This was a suspiciously quick 10 minute change, will leave this PR unmerged until I can get a little more time to test out edge cases, etc.