small edit to blog entry 2026/0131

This commit is contained in:
2026-01-31 20:57:04 +01:00
parent 21059a4d2e
commit 9380544b3e

View File

@@ -6,6 +6,6 @@ I suspect SvelteKit has issues rendering pages that aren't directly linked anywh
I had this fixed just before realising that the devlog overview page itself errors out on refresh as well! Even more strangely: the blog overview page was also affected. I suspected there was some common cause, and indeed, `journalctl` revealed it: a function I called to map a `Map` to an `Array` failed because the `Map` didn't exist. I used these `Map` objects to store data about individual posts, so their functionality was partially shared between the devlog and the blog. I had this fixed just before realising that the devlog overview page itself errors out on refresh as well! Even more strangely: the blog overview page was also affected. I suspected there was some common cause, and indeed, `journalctl` revealed it: a function I called to map a `Map` to an `Array` failed because the `Map` didn't exist. I used these `Map` objects to store data about individual posts, so their functionality was partially shared between the devlog and the blog.
To be honest, this error still doesn't make any sense to me, but I was able to fix it by creating a custom data type that mimicked a key-value structure. This made remapping a lot simpler as the data was then already in `Array` format. To be honest, this error still doesn't make any sense to me, but I was able to fix it by creating a custom data type that mimicked a key-value structure. Something about the `Map` structure caused issues as it cleared its values on refresh or something. This also made remapping a lot simpler as the data was then already in `Array` format.
Lesson learned: if you ever work on something that you need to transfer over from a work-in-progress version to a finished version, make sure that the finished version works as you intend it to! Do not assume that everything will work fine. Lesson learned: if you ever work on something that you need to transfer over from a work-in-progress version to a finished version, make sure that the finished version works as you intend it to! Do not assume that everything will work fine.