Fix auto-unfold CWs when no regexp is set

Fixes #778
signup-info-prompt
Thibaut Girka 2018-10-12 23:12:39 +02:00 committed by ThibG
parent 3d5d899094
commit 70d346ea95
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,11 @@ export function autoUnfoldCW (settings, status) {
} }
const rawRegex = settings.getIn(['content_warnings', 'filter']); const rawRegex = settings.getIn(['content_warnings', 'filter']);
if (!rawRegex) {
return true;
}
let regex = null; let regex = null;
try { try {