pmrt/whatshidden

Handle better messages with not supported type

pmrt opened this issue · 0 comments

pmrt commented
  • toString should return: not supported.

export function extract(msgData) {
const type = Type[msgData.type];
return type ? new type(msgData) : new Message(msgData);
}

toString() doesn't exist in parent < Messages >, so it will throw an error.