The issue I was running into was when multiple links lead to the same content. Say neither /foo nor /bar existed, so both urls would lead to a 404 page.
/foo (the 404 page) would have the correct styles, but /bar would not. /bar would be missing the content specific to the 404 page, but oddly, not the global styles (like header, page background, etc. Still not entirely sure why this is, but I'm not curious enough to go looking).
Finally realized it was the sheet only finishing it's reset after the next page had been prerendered. Just needed to insert an await to ensure the reset finished before prerendering the next page, else any common / shared styles would be removed.
Fixes #17
The issue I was running into was when multiple links lead to the same content. Say neither
/foo
nor/bar
existed, so both urls would lead to a 404 page./foo
(the 404 page) would have the correct styles, but/bar
would not./bar
would be missing the content specific to the 404 page, but oddly, not the global styles (like header, page background, etc. Still not entirely sure why this is, but I'm not curious enough to go looking).Finally realized it was the sheet only finishing it's reset after the next page had been prerendered. Just needed to insert an
await
to ensure the reset finished before prerendering the next page, else any common / shared styles would be removed.