The prismatic spray spell can do different damage types (and status effects) depending on a d8 roll for the target that determines which ray targets each creature in the area of effect.
Say the target is a dwarf, and thus has the Dwarven Resilience trait. The caster rolls an 8 initially (causing the target to be struck by two rays instead), and then one of the two rerolls is a 4, which causes poison damage? Since Dwarven Resilience provides "advantage on saving throws against poison" (not just advantage against being poisoned, as protection from poison does), the dwarf should get advantage on the save - even though the effect of the other ray might not be poison-related.
Is my interpretation of the sequence of events correct?