I need to hide a button if a returned data field isn’t one of two options. If the returned usertype is NOT admin, nor is it sysadmin… the button should be hidden.
I have tried every combination of || to make this work as expected. However I can only get it to evaluate the first condition of the or statement. If the second part of the OR is true… it doesn’t matter. What am I missing??
None of the following have worked when the usertype is sysadmin. It ONLY works for admin.
((userDetails.data.query.usertype !== admin) || (userDetails.data.query.usertype !== sysadmin))
((userDetails.data.query.usertype != admin) || (userDetails.data.query.usertype != sysadmin))
userDetails.data.query.usertype!=('admin' || 'sysadmin')
(userDetails.data.query.usertype != ('admin' || 'sysadmin'))