they are functions

This commit is contained in:
Jimmy Wärting
2019-04-18 00:22:44 +02:00
parent 04210bc55c
commit 99560939f7
+2 -2
View File
@@ -239,12 +239,12 @@
} }
// string -> buffer // string -> buffer
var textEncode = typeof TextEncoder === 'object' var textEncode = typeof TextEncoder === 'function'
? TextEncoder.prototype.encode.bind(new TextEncoder()) ? TextEncoder.prototype.encode.bind(new TextEncoder())
: stringEncode : stringEncode
// buffer -> string // buffer -> string
var textDecode = typeof TextDecoder === 'object' var textDecode = typeof TextDecoder === 'function'
? TextDecoder.prototype.decode.bind(new TextDecoder()) ? TextDecoder.prototype.decode.bind(new TextDecoder())
: stringDecode : stringDecode