Fix regression in cloud storage import of "Filter lists" pane

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2721
This commit is contained in:
Raymond Hill 2023-07-04 07:27:14 -04:00
parent 083a318090
commit 80b3f3c3c0
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 2 additions and 2 deletions

View File

@ -836,14 +836,14 @@ self.cloud.onPull = function fromCloudData(data, append) {
selectedSet.delete(listkey); selectedSet.delete(listkey);
} }
if ( selectedSet.size !== 0 ) { if ( selectedSet.size !== 0 ) {
const textarea = qs$('#lists .liEntry[data-role="import"] textarea'); const textarea = qs$('#lists .listEntry[data-role="import"] textarea');
const lines = append const lines = append
? textarea.value.split(/[\n\r]+/) ? textarea.value.split(/[\n\r]+/)
: []; : [];
lines.push(...selectedSet); lines.push(...selectedSet);
if ( lines.length !== 0 ) { lines.push(''); } if ( lines.length !== 0 ) { lines.push(''); }
textarea.value = lines.join('\n'); textarea.value = lines.join('\n');
dom.cl.toggle('#lists .liEntry[data-role="import"]', 'expanded', textarea.value !== ''); dom.cl.toggle('#lists .listEntry[data-role="import"]', 'expanded', textarea.value !== '');
} }
renderWidgets(); renderWidgets();