From 0545aeff3fb8368238e8c61d43589ef8b4a6d8e8 Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Tue, 9 Oct 2018 11:00:48 +0300 Subject: [PATCH] Fix variable --- client/src/components/Logs/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/components/Logs/index.js b/client/src/components/Logs/index.js index d9ca8e89..59a3ca16 100644 --- a/client/src/components/Logs/index.js +++ b/client/src/components/Logs/index.js @@ -43,8 +43,9 @@ class Logs extends Component { const { userRules } = this.props.filtering; const lineEnding = !endsWith(userRules, '\n') ? '\n' : ''; const baseRule = `||${domain}^$important`; - const blockingRule = type === 'block' ? `@@${baseRule}` : baseRule; - const unblockingRule = type === 'block' ? baseRule : `@@${baseRule}`; + const baseUnblocking = `@@${baseRule}`; + const blockingRule = type === 'block' ? baseUnblocking : baseRule; + const unblockingRule = type === 'block' ? baseRule : baseUnblocking; const preparedBlockingRule = new RegExp(`(^|\n)${escapeRegExp(blockingRule)}($|\n)`); const preparedUnblockingRule = new RegExp(`(^|\n)${escapeRegExp(unblockingRule)}($|\n)`);