message: fix: error checking null and invalid markers
diff: @@ -13,17 +13,19 @@ interface Props {
  const MarkerTypeDisplay = ({ className, type }: Props) => {
  const { services } = type;
  + if (type.type) {
  return (
  <AppContext.Consumer>
  {({ lang }) => (
  <div className={`${className} ${services ? 'services' : ''}`}>
  <span
  style={{
  - backgroundColor: MARKER_TYPES[type.type].color,
  + backgroundColor:
  + MARKER_TYPES[type.type]?.color || MARKER_TYPES.notFound.color,
  }}
  >
  <span className="label">
  - {t(lang, s => s.markerTypes[type.type])}
  + {t(lang, s => s.markerTypes[type.type] || type.type)}
  </span>
  {services && (
  <span className="services">
  @@ -31,10 +33,11 @@ const MarkerTypeDisplay = ({ className, type }: Props) => {
  <span
  key={service}
  style={{
  - backgroundColor: SERVICES[service].color,
  + backgroundColor:
  + SERVICES[service]?.color || SERVICES.other.color,
  }}
  >
  - {t(lang, s => s.services[service])}
  + {t(lang, s => s.services[service] || service)}
  </span>
  ))}
  </span>
  @@ -44,6 +47,40 @@ const MarkerTypeDisplay = ({ className, type }: Props) => {
  )}
  </AppContext.Consumer>
  );
  + }
  + if (services) {
  + return (
  + <AppContext.Consumer>
  + {({ lang }) => (
  + <div
  + className={`${className} ${services ? 'services' : ''}`}
  + style={{
  + marginTop: '0',
  + }}
  + >
  + <span>
  + {services && (
  + <span className="services">
  + {services.map(service => (
  + <span
  + key={service}
  + style={{
  + backgroundColor:
  + SERVICES[service]?.color || SERVICES.other.color,
  + }}
  + >
  + {t(lang, s => s.services[service] || service)}
  + </span>
  + ))}
  + </span>
  + )}
  + </span>
  + </div>
  + )}
  + </AppContext.Consumer>
  + );
  + }
  + return null;
  };
  export default styled(MarkerTypeDisplay)`
  