File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed
shiny/www/py-shiny/markdown-stream Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -163,11 +163,10 @@ class MarkdownElement extends LightElement {
163163 }
164164
165165 static async #doUnBind( el : HTMLElement ) : Promise < void > {
166- if ( ! window . Shiny ) return ;
167- if ( ! Shiny . unbindAll ) return ;
166+ if ( ! window ?. Shiny ?. unbindAll ) return ;
168167
169168 try {
170- Shiny . unbindAll ( el ) ;
169+ window . Shiny . unbindAll ( el ) ;
171170 } catch ( err ) {
172171 showShinyClientMessage ( {
173172 status : "error" ,
@@ -177,12 +176,11 @@ class MarkdownElement extends LightElement {
177176 }
178177
179178 static async #doBind( el : HTMLElement ) : Promise < void > {
180- if ( ! window . Shiny ) return ;
181- if ( ! Shiny . initializeInputs ) return ;
182- if ( ! Shiny . bindAll ) return ;
179+ if ( ! window ?. Shiny ?. initializeInputs ) return ;
180+ if ( ! window ?. Shiny ?. bindAll ) return ;
183181
184182 try {
185- Shiny . initializeInputs ( el ) ;
183+ window . Shiny . initializeInputs ( el ) ;
186184 } catch ( err ) {
187185 showShinyClientMessage ( {
188186 status : "error" ,
@@ -191,7 +189,7 @@ class MarkdownElement extends LightElement {
191189 }
192190
193191 try {
194- await Shiny . bindAll ( el ) ;
192+ await window . Shiny . bindAll ( el ) ;
195193 } catch ( err ) {
196194 showShinyClientMessage ( {
197195 status : "error" ,
You can’t perform that action at this time.
0 commit comments