File tree 1 file changed +5
-2
lines changed
arduino-ide-extension/src/browser/create
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { AuthenticationClientService } from '../auth/authentication-client-servi
5
5
import { ArduinoPreferences } from '../arduino-preferences' ;
6
6
import { SketchCache } from '../widgets/cloud-sketchbook/cloud-sketch-cache' ;
7
7
import { Create , CreateError } from './typings' ;
8
+ import * as util from 'util' ;
8
9
9
10
export interface ResponseResultProvider {
10
11
( response : Response ) : Promise < any > ;
@@ -277,7 +278,7 @@ export class CreateApi {
277
278
const secrets = (
278
279
typeof content === 'string'
279
280
? content
280
- : new TextDecoder ( ) . decode ( content )
281
+ : new util . TextDecoder ( 'utf8' ) . decode ( content )
281
282
)
282
283
. split ( / \r ? \n / )
283
284
. reduce ( ( prev , curr ) => {
@@ -341,7 +342,9 @@ export class CreateApi {
341
342
const headers = await this . headers ( ) ;
342
343
343
344
let data : string =
344
- typeof content === 'string' ? content : new TextDecoder ( ) . decode ( content ) ;
345
+ typeof content === 'string'
346
+ ? content
347
+ : new util . TextDecoder ( ) . decode ( content ) ;
345
348
data = await this . toggleSecretsInclude ( posixPath , data , 'remove' ) ;
346
349
347
350
const payload = { data : btoa ( data ) } ;
You can’t perform that action at this time.
0 commit comments