remove fixBoolean()

This commit is contained in:
tophf 2017-04-19 19:13:11 +03:00
parent f5da135e81
commit 4fd1a3db62

View File

@ -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 [];