Yes, it is. The when and after clauses are adverbials there and adverbials are often set off with a comma. Omitting the comma would not be wrong though, in my opinion.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
addyaddyI agree, but not fully. I feel it a weak clause which should be followed by a comma if it were to appear before the strong clause that precedes it. Since it doesn't in this case, I feel last comma should be removed. Do you agreeNo. I don't think it would be a tragedy if were not used, but I think the sentence is easier to read with the comma. There is