refactor: simplify by using switch
instead of if
#1190
Merged
Loading
switch
instead of if
#1190