File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,14 +105,14 @@ export const video = (() => {
105105 . then ( resToVideo )
106106 . then ( ( v ) => {
107107 vid . load ( ) ;
108+ observer . observe ( vid ) ;
108109 return v ;
109110 } )
110111 . catch ( ( err ) => {
111112 bar . style . backgroundColor = 'red' ;
112113 inf . innerText = `Error loading video` ;
113114 console . error ( err ) ;
114- } )
115- . finally ( ( ) => observer . observe ( vid ) ) ;
115+ } ) ;
116116 } ) ;
117117 } ;
118118
@@ -126,7 +126,7 @@ export const video = (() => {
126126 }
127127
128128 progress . complete ( 'video' ) ;
129- return resToVideo ( res ) . finally ( ( ) => {
129+ return resToVideo ( res ) . then ( ( ) => {
130130 wrap . appendChild ( vid ) ;
131131 observer . observe ( vid ) ;
132132 } ) ;
Original file line number Diff line number Diff line change @@ -132,9 +132,6 @@ export const request = (method, path) => {
132132 method : String ( method ) . toUpperCase ( ) ,
133133 } ;
134134
135- window . addEventListener ( 'offline' , ( ) => ac . abort ( ) , { once : true } ) ;
136- window . addEventListener ( 'popstate' , ( ) => ac . abort ( ) , { once : true } ) ;
137-
138135 let reqTtl = 0 ;
139136 let reqRetry = 0 ;
140137 let reqDelay = 0 ;
You can’t perform that action at this time.
0 commit comments