From 8ed8666e77b6bc19ed9f1494edbb9d0140564845 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 25 Sep 2018 14:36:54 -0400 Subject: [PATCH] fix https://github.com/uBlockOrigin/uMatrix-issues/issues/63 --- src/js/start.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/js/start.js b/src/js/start.js index 8c57f21..b46038a 100644 --- a/src/js/start.js +++ b/src/js/start.js @@ -1,7 +1,7 @@ /******************************************************************************* uMatrix - a browser extension to black/white list requests. - Copyright (C) 2014-2018 Raymond Hill + Copyright (C) 2014-present Raymond Hill This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -52,9 +52,6 @@ var processCallbackQueue = function(queue, callback) { var onAllDone = function() { µm.webRequest.start(); - µm.assets.addObserver(µm.assetObserver.bind(µm)); - µm.scheduleAssetUpdater(µm.userSettings.autoUpdate ? 7 * 60 * 1000 : 0); - vAPI.cloud.start([ 'myRulesPane' ]); }; @@ -74,6 +71,12 @@ var onTabsReady = function(tabs) { var onUserSettingsLoaded = function() { µm.loadHostsFiles(); µm.loadRecipes(); + + // https://github.com/uBlockOrigin/uMatrix-issues/issues/63 + // Ensure user settings are fully loaded before launching the + // asset updater. + µm.assets.addObserver(µm.assetObserver.bind(µm)); + µm.scheduleAssetUpdater(µm.userSettings.autoUpdate ? 7 * 60 * 1000 : 0); }; /******************************************************************************/