tanx / mailreader

RFC parser as an AMD module written with node API for the browser.
MIT License
9 stars 5 forks source link

make sure node.content is always an ArrayBuffer #14

Closed c-f-h closed 8 years ago

c-f-h commented 8 years ago

node.content is later fed to TextDecoder#decode. While the emailjs-stringencoding shim does accept empty strings, the native browser implementation always wants an ArrayBuffer and therefore chokes on empty strings.

This patch makes it possible to substitute the native browser TextDecoder implementation for the emailjs shim in supported browsers.