File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ StringDecoder.prototype.write = function(buffer) {
9696 charStr = charBuffer . toString ( encoding , 0 , charLength ) ;
9797
9898 // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
99- var charCode = charStr . charCodeAt ( charStr . length - 1 ) ;
99+ const charCode = charStr . charCodeAt ( charStr . length - 1 ) ;
100100 if ( charCode >= 0xD800 && charCode <= 0xDBFF ) {
101101 charLength += surrogateSize ;
102102 charStr = '' ;
@@ -128,8 +128,8 @@ StringDecoder.prototype.write = function(buffer) {
128128 this . charLength = charLength ;
129129 charStr += buffer . toString ( encoding , 0 , end ) ;
130130
131- var end = charStr . length - 1 ;
132- var charCode = charStr . charCodeAt ( end ) ;
131+ end = charStr . length - 1 ;
132+ const charCode = charStr . charCodeAt ( end ) ;
133133 // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
134134 if ( charCode >= 0xD800 && charCode <= 0xDBFF ) {
135135 charLength += surrogateSize ;
You can’t perform that action at this time.
0 commit comments