How do I compare enums in functions? E.g. compare the built in “Appfarm Environment” enum with the built in “Active Environment” enum value.
The following doesn’t seem to work:
I have also tried with combinations of activeEnvironment.value and appfarmEnvironment.production.value
activeEnvironment.value
appfarmEnvironment.production.value
Hi Eirik, and welcome to our community!
What you want to do here is to take in activeEnvironment as a Function Param (as you have already done) and then take in production as a Function Param from the list of Enum Constants, found here:
activeEnvironment
production
Then you compare activeEnvironment === production.value and that should do the trick!
activeEnvironment === production.value
Thanks for fast response