Skip to content

Commit e970d36

Browse files
committed
fix(cloudopt-adblock): Fix "slice() of undefined" issue
1 parent 09c2956 commit e970d36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/cloudopt-adblock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ cloudopt.adblock = (function(cloudopt) {
3131

3232
var configuration = {
3333
filters: [101],
34-
whitelist: cloudoptConfig.whitelistAds.slice(),
34+
whitelist: cloudoptConfig.whitelistAds? cloudoptConfig.whitelistAds.slice() : [],
3535
rules: cloudoptConfig.customRule,
3636
filtersMetadataUrl: 'https://cdn.cloudopt.net/filters/chromium/filters.json',
3737
filterRulesUrl: 'https://cdn.cloudopt.net/filters/chromium/{filter_id}.txt'

0 commit comments

Comments
 (0)