mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-21 18:08:46 -04:00
Check for document before checking for readyState
This commit is contained in:
@@ -122,7 +122,7 @@ chrome.extension.sendMessage({}, function(response) {
|
||||
|
||||
function initializeWhenReady(document) {
|
||||
var readyStateCheckInterval = setInterval(function() {
|
||||
if (document.readyState === 'complete') {
|
||||
if (document && document.readyState === 'complete') {
|
||||
clearInterval(readyStateCheckInterval);
|
||||
initializeNow(document);
|
||||
}
|
||||
|
Reference in New Issue
Block a user