In many places I'm setting modified by, created by etc:
const test = this.state.isValueEdited
? {
modifiedById: getLoggedInUser().userId,
}
: {
// TODO
};
How could I check if getLoggedInUser
has some value, than access .userId
.. otherwise lets set null
.
Thanks
Cheers