fix: validate theme_scss attribute (#23467)

#22851
This commit is contained in:
Saurabh 2020-09-30 18:10:30 +05:30 committed by GitHub
parent 0a88624df0
commit 2118d215e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@
frappe.ui.form.on('Website Theme', {
validate(frm) {
let theme_scss = frm.doc.theme_scss;
if (theme_scss.includes('frappe/public/scss/website')
if (theme_scss && theme_scss.includes('frappe/public/scss/website')
&& !theme_scss.includes('erpnext/public/scss/website')
) {
frm.set_value('theme_scss',