fix edit link conditional