2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 14:50:56 +00:00

Added condition to return value if there are no default colors.

This commit is contained in:
Shahzad Bin Shahjahan 2024-02-02 18:28:38 +05:30
parent 8db453c2f0
commit 3cf59c259e

View File

@ -71,6 +71,7 @@ export default {
return this.df.options;
},
selectedColorLabel() {
if(!this.colors) return this.value;
const color = this.colors.find((c) => this.value === c.value);
return color ? color.label : this.value;
},