`|| undefined` is unnecessary; also, you may want to try splitting this long line across several statements