fix: validate theme_scss attribute
diff --git a/erpnext/public/js/website_theme.js b/erpnext/public/js/website_theme.js
index 84de2f5..9662f78 100644
--- a/erpnext/public/js/website_theme.js
+++ b/erpnext/public/js/website_theme.js
@@ -4,8 +4,8 @@
frappe.ui.form.on('Website Theme', {
validate(frm) {
let theme_scss = frm.doc.theme_scss;
- if (theme_scss.includes('frappe/public/scss/website')
- && !theme_scss.includes('erpnext/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',
`${frm.doc.theme_scss}\n@import "erpnext/public/scss/website";`);