File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
arduino-ide-extension/src/browser/create Expand file tree Collapse file tree 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
55import { ArduinoPreferences } from '../arduino-preferences' ;
66import { SketchCache } from '../widgets/cloud-sketchbook/cloud-sketch-cache' ;
77import { Create , CreateError } from './typings' ;
8+ import * as util from 'util' ;
89
910export interface ResponseResultProvider {
1011 ( response : Response ) : Promise < any > ;
@@ -277,7 +278,7 @@ export class CreateApi {
277278 const secrets = (
278279 typeof content === 'string'
279280 ? content
280- : new TextDecoder ( ) . decode ( content )
281+ : new util . TextDecoder ( 'utf8' ) . decode ( content )
281282 )
282283 . split ( / \r ? \n / )
283284 . reduce ( ( prev , curr ) => {
@@ -341,7 +342,9 @@ export class CreateApi {
341342 const headers = await this . headers ( ) ;
342343
343344 let data : string =
344- typeof content === 'string' ? content : new TextDecoder ( ) . decode ( content ) ;
345+ typeof content === 'string'
346+ ? content
347+ : new util . TextDecoder ( ) . decode ( content ) ;
345348 data = await this . toggleSecretsInclude ( posixPath , data , 'remove' ) ;
346349
347350 const payload = { data : btoa ( data ) } ;
You can’t perform that action at this time.
0 commit comments