remove fixBoolean()
This commit is contained in:
parent
f5da135e81
commit
4fd1a3db62
13
storage.js
13
storage.js
|
@ -79,14 +79,15 @@ function getStyles(options, callback) {
|
|||
|
||||
|
||||
function filterStyles({
|
||||
enabled,
|
||||
enabled = null,
|
||||
url = null,
|
||||
id = null,
|
||||
matchUrl = null,
|
||||
asHash = null,
|
||||
strictRegexp = true, // used by the popup to detect bad regexps
|
||||
} = {}) {
|
||||
enabled = fixBoolean(enabled);
|
||||
enabled = enabled === null || typeof enabled == 'boolean' ? enabled :
|
||||
typeof enabled == 'string' ? enabled == 'true' : null;
|
||||
id = id === null ? null : Number(id);
|
||||
|
||||
if (enabled === null
|
||||
|
@ -504,14 +505,6 @@ function reportError(...args) {
|
|||
}
|
||||
|
||||
|
||||
function fixBoolean(b) {
|
||||
if (typeof b != 'undefined') {
|
||||
return b != 'false';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
function getDomains(url) {
|
||||
if (url.indexOf('file:') == 0) {
|
||||
return [];
|
||||
|
|
Loading…
Reference in New Issue
Block a user