Fossil SCM
Fix a potential null deref in sample JS code.
Commit
d361947c8df52dafba6ce87e0e22c4fa98d3ba52f2dd88271485075e880e3eb8
Parent
439f446df68406a…
1 file changed
+1
-1
+1
-1
| --- www/fileedit-page.md | ||
| +++ www/fileedit-page.md | ||
| @@ -121,11 +121,11 @@ | ||
| 121 | 121 | At the very bottom of the [site skin's footer](customskin.md), add a |
| 122 | 122 | script tag similar to the following: |
| 123 | 123 | |
| 124 | 124 | ```javascript |
| 125 | 125 | <script nonce="$<nonce>"> |
| 126 | -if(fossil && fossil.page && fossil.page.name==='fileedit'){ | |
| 126 | +if(window.fossil && fossil.page && fossil.page.name==='fileedit'){ | |
| 127 | 127 | fossil.page.addEventListener( |
| 128 | 128 | 'fileedit-preview-updated', |
| 129 | 129 | (ev)=>{ |
| 130 | 130 | if(ev.detail.previewMode==='wiki'){ |
| 131 | 131 | ev.detail.element.querySelectorAll( |
| 132 | 132 |
| --- www/fileedit-page.md | |
| +++ www/fileedit-page.md | |
| @@ -121,11 +121,11 @@ | |
| 121 | At the very bottom of the [site skin's footer](customskin.md), add a |
| 122 | script tag similar to the following: |
| 123 | |
| 124 | ```javascript |
| 125 | <script nonce="$<nonce>"> |
| 126 | if(fossil && fossil.page && fossil.page.name==='fileedit'){ |
| 127 | fossil.page.addEventListener( |
| 128 | 'fileedit-preview-updated', |
| 129 | (ev)=>{ |
| 130 | if(ev.detail.previewMode==='wiki'){ |
| 131 | ev.detail.element.querySelectorAll( |
| 132 |
| --- www/fileedit-page.md | |
| +++ www/fileedit-page.md | |
| @@ -121,11 +121,11 @@ | |
| 121 | At the very bottom of the [site skin's footer](customskin.md), add a |
| 122 | script tag similar to the following: |
| 123 | |
| 124 | ```javascript |
| 125 | <script nonce="$<nonce>"> |
| 126 | if(window.fossil && fossil.page && fossil.page.name==='fileedit'){ |
| 127 | fossil.page.addEventListener( |
| 128 | 'fileedit-preview-updated', |
| 129 | (ev)=>{ |
| 130 | if(ev.detail.previewMode==='wiki'){ |
| 131 | ev.detail.element.querySelectorAll( |
| 132 |