Skip to content

Commit

Permalink
Merge pull request #17 from numerique-gouv/fflorent-patch-1
Browse files Browse the repository at this point in the history
Fix JS error on document access denied page
  • Loading branch information
hexaltation authored Jul 10, 2024
2 parents e9b679a + f786f30 commit cc8c7f1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dockerfiles/grist/ressources/dinum-custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,13 @@

window.addEventListener('load', async (event) => {
await waitForElm('body.interface-full');
// gristApp.topAppModel.appObs is not populated at that point, listen for the observer to their first change

const appObs = gristApp.topAppModel && gristApp.topAppModel.appObs;
if (!appObs) {
return;
}
// appObs is not populated at that point, listen for the observer to their first change
let listener;
listener = gristApp.topAppModel.appObs.addListener( async (appObs) => {
listener = appObs.addListener( async (appObs) => {
// Gauffre must be displayed only in home pages
if (appObs.pageType.get() !== "home"){
return 1;
Expand Down

0 comments on commit cc8c7f1

Please sign in to comment.