Add type check

This commit is contained in:
Cohee 2024-03-15 00:22:10 +02:00
parent 60ea9df55e
commit 54d5e269d5
1 changed files with 1 additions and 1 deletions

View File

@ -2019,7 +2019,7 @@ async function importTheme(file) {
throw new Error('Theme with that name already exists');
}
if (parsed.custom_css.includes('@import')) {
if (typeof parsed.custom_css === 'string' && parsed.custom_css.includes('@import')) {
const confirm = await callPopup('This theme contains @import lines in the Custom CSS. Press "Yes" to proceed.', 'confirm', '', { okButton: 'Yes' });
if (!confirm) {
throw new Error('Theme contains @import lines');