leanprover / doc-gen4

Document Generator for Lean 4
Apache License 2.0
62 stars 41 forks source link

fix: don't fetch unused cache, FF fixes #153

Closed digama0 closed 12 months ago

digama0 commented 12 months ago

Even though the result of fetchCachedDeclarationData was ignored due to #133, we were still performing the request, which takes some time on FF to deserialize (or something), depending on what happened to be on the user's cache (because the cache is never written to, only read). This moves the disabling earlier, so that the cache is not read at all (since this means deserializing an old version of the mathlib JSON data, then ignoring it and fetching another version of the mathlib JSON data).

Also fixes an issue where the undefined pattern is passed to decodeURIComponent (resulting in "undefined" which is mishandled by subsequent code).