Fix null values in entity getSQLProps()
Fixes 'null' role name when staff member has no hoisted rolescshd
parent
307b9fdee4
commit
8d151c1800
|
@ -42,7 +42,7 @@ class ThreadMessage {
|
||||||
getSQLProps() {
|
getSQLProps() {
|
||||||
return Object.entries(this).reduce((obj, [key, value]) => {
|
return Object.entries(this).reduce((obj, [key, value]) => {
|
||||||
if (typeof value === "function") return obj;
|
if (typeof value === "function") return obj;
|
||||||
if (typeof value === "object") {
|
if (typeof value === "object" && value != null) {
|
||||||
obj[key] = JSON.stringify(value);
|
obj[key] = JSON.stringify(value);
|
||||||
} else {
|
} else {
|
||||||
obj[key] = value;
|
obj[key] = value;
|
||||||
|
|
Loading…
Reference in New Issue