@@ -30,7 +30,7 @@ class _Modal {
3030 ...maskStyle ,
3131 ...filterStyle [ filterType || 'translucent' ]
3232 }
33- Object . assign ( this . mask . style , realMaskStyle )
33+ Object . assign ( this . mask . style || { } , realMaskStyle )
3434 }
3535
3636 showModal ( showDelay : boolean ) {
@@ -50,7 +50,7 @@ class _Modal {
5050 // Only delay-allowed rules exist, can delay
5151 // @since 0.4.0
5252 const link = document . createElement ( 'a' )
53- Object . assign ( link . style , linkStyle )
53+ Object . assign ( link . style || { } , linkStyle )
5454 link . setAttribute ( 'href' , 'javascript:void(0)' )
5555 const text = t ( msg => msg . more5Minutes )
5656 link . innerText = text
@@ -131,9 +131,10 @@ function exitScreen(): Promise<void> {
131131 return Promise . resolve ( )
132132 }
133133 return new Promise < void > ( resolve => {
134- const exitFullscreen = document . exitFullscreen
135- if ( exitFullscreen ) {
136- exitFullscreen ( ) . then ( resolve ) . catch ( ( ) => console . log ( "Failed to exit fullscreen" ) )
134+ if ( document . exitFullscreen ) {
135+ document . exitFullscreen ( )
136+ . then ( resolve )
137+ . catch ( e => console . warn ( "Failed to exit fullscreen" , e ) )
137138 } else {
138139 resolve ( )
139140 }
@@ -142,7 +143,7 @@ function exitScreen(): Promise<void> {
142143
143144function link2Setup ( url : string ) : HTMLParagraphElement {
144145 const link = document . createElement ( 'a' )
145- Object . assign ( link . style , linkStyle )
146+ Object . assign ( link . style || { } , linkStyle )
146147 link . setAttribute ( 'href' , 'javascript:void(0)' )
147148 const text = t ( msg => msg . timeLimitMsg )
148149 . replace ( '{appName}' , t2Chrome ( msg => msg . meta . name ) )
0 commit comments