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.
node.content
is later fed toTextDecoder#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.