1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-04 16:47:15 +02:00

Fix style in index.js (#3802)

This commit is contained in:
Manish Jethani 2021-08-03 21:33:11 +05:30 committed by GitHub
parent 5237558f9b
commit 4094f48547
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,13 +119,13 @@ function pslInit(raw) {
// Use loadJSON() because require() would keep the string in memory. // Use loadJSON() because require() would keep the string in memory.
serialized = loadJSON('build/publicsuffixlist.json'); serialized = loadJSON('build/publicsuffixlist.json');
} catch (error) { } catch (error) {
if (process.env.npm_lifecycle_event !== 'install') { if ( process.env.npm_lifecycle_event !== 'install' ) {
// This should never happen except during package installation. // This should never happen except during package installation.
console.error(error); console.error(error);
} }
} }
if (serialized !== null) { if ( serialized !== null ) {
globals.publicSuffixList.fromSelfie(serialized); globals.publicSuffixList.fromSelfie(serialized);
return globals.publicSuffixList; return globals.publicSuffixList;
} }
@ -165,7 +165,7 @@ function reset() {
// This is because some of the code (e.g. publicsuffixlist.js) sets // This is because some of the code (e.g. publicsuffixlist.js) sets
// module.exports. Once all included files are written like ES modules, using // module.exports. Once all included files are written like ES modules, using
// export statements, this should no longer be necessary. // export statements, this should no longer be necessary.
if (typeof module !== 'undefined' && typeof exports !== 'undefined') { if ( typeof module !== 'undefined' && typeof exports !== 'undefined' ) {
module.exports = exports; module.exports = exports;
} }