mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add type check
This commit is contained in:
@ -2019,7 +2019,7 @@ async function importTheme(file) {
|
|||||||
throw new Error('Theme with that name already exists');
|
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' });
|
const confirm = await callPopup('This theme contains @import lines in the Custom CSS. Press "Yes" to proceed.', 'confirm', '', { okButton: 'Yes' });
|
||||||
if (!confirm) {
|
if (!confirm) {
|
||||||
throw new Error('Theme contains @import lines');
|
throw new Error('Theme contains @import lines');
|
||||||
|
Reference in New Issue
Block a user