replace "undefined" with "---"