fix(getOperands): improve logic for dealing with `|`