sufone / layl

🌙 Calculator for tahajjud, qiyam, and worship & sleep in an Islamic night!

Home Page:https://layl.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

First load of Arabic makes page blank, needs refresh

mr-islam opened this issue · comments

Maybe it works the same for English if Arabic is loaded the same

Check language loading and svelte 18n

This error is not there on a local build, so clearly it's something when it's built / served / making network requests…

I'm hitting a blank about why this is happening… maybe there's some code in some library that's not playing nice, but I don't know what…

I might just end up running a page refresh after changing the locale… that's so lazy, but ideally people should receive their device language by default, and if not they change the language once manually, and the browser remembers automatically. This can help prevent weird font/styling bugs as well I guess.

Need to remove the counter for how many times language has been changed then…

Even that did not work: 45508e7

.......................................

Really tired of this bug… let me try a cache-free deploy from netlify

Um… so the netlify branch deploy was failing for the last 4~ commits so when I was testing it was still the old version...

😢

Alhamdulillah solved! It was setting a loading delay of zero that caused the trouble it seems. To prevent any future mess, should try:

  1. re-introduce the delay and see if the error comes back.
  2. not specify any loading delay, since svelte-i18n docs show it to be optional.