Fix auto-unfold CWs when no regexp is set

Fixes #778
lolsob-rspec
Thibaut Girka 2018-10-12 23:12:39 +02:00 committed by ThibG
parent dbc1b36b61
commit 794b2dad99
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 {