Fail graciously if no benchmark dataset found

This commit is contained in:
Raymond Hill 2020-02-21 08:13:15 -05:00
parent b784b7d569
commit ddc2b11657
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -692,7 +692,8 @@
const datasetURL = µBlock.hiddenSettings.benchmarkDatasetURL; const datasetURL = µBlock.hiddenSettings.benchmarkDatasetURL;
if ( datasetURL === 'unset' ) { if ( datasetURL === 'unset' ) {
return Promise.reject('No dataset'); console.info(`No benchmark dataset available.`);
return Promise.resolve();
} }
console.info(`Loading benchmark dataset...`); console.info(`Loading benchmark dataset...`);
datasetPromise = µBlock.assets.fetchText(datasetURL).then(details => { datasetPromise = µBlock.assets.fetchText(datasetURL).then(details => {