Commit 6d6c6b6f authored by Eduardo Sanz García's avatar Eduardo Sanz García Committed by Eduardo

Fix type issue raised by typescript 4.1.2

parent 19777a21
...@@ -82,6 +82,7 @@ function init() { ...@@ -82,6 +82,7 @@ function init() {
/** /**
* Returns a Promise that resolves when the document has loaded (but subresources * Returns a Promise that resolves when the document has loaded (but subresources
* may still be loading). * may still be loading).
* @returns {Promise<void>}
*/ */
function documentReady() { function documentReady() {
return new Promise(resolve => { return new Promise(resolve => {
...@@ -90,7 +91,7 @@ function documentReady() { ...@@ -90,7 +91,7 @@ function documentReady() {
} }
// nb. `readystatechange` may be emitted twice, but `resolve` only resolves // nb. `readystatechange` may be emitted twice, but `resolve` only resolves
// on the first call. // on the first call.
document.addEventListener('readystatechange', resolve); document.addEventListener('readystatechange', () => resolve());
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment