Fix import TextDecoder in output for nodejs config

This commit is contained in:
Corbin Uselton
2018-03-30 10:50:01 -07:00
parent c97df46e08
commit 13520e324b

View File

@ -645,7 +645,7 @@ impl<'a> Context<'a> {
} }
if self.config.nodejs { if self.config.nodejs {
self.globals.push_str(&format!(" self.globals.push_str(&format!("
const TextDecoder = require('util'); const TextDecoder = require('util').TextDecoder;
")); "));
} else if !self.config.browser { } else if !self.config.browser {
self.globals.push_str(&format!(" self.globals.push_str(&format!("