(a)
Whenever a candidate for nomination for a nonpartisan office at a primary election dies on or before the day of the election, and a sufficient number of ballots are marked as being voted for him or her to entitle him or her to nomination if he or she had lived until after the election, a vacancy exists on the general election ballot, which shall be filled in the manner provided in Section 8807 for filling a vacancy caused by the death of a candidate.
(b)
Whenever a candidate for nomination for a voter-nominated office at a primary election dies on or before the day of the election, and a sufficient number of ballots are marked as being voted for him or her to entitle him or her to nomination if he or she had lived until
after the election, the name of the deceased candidate shall appear on the general election ballot and the general election shall proceed in accordance with subdivision (b) of Section 8803.