mirror of
https://github.com/yuukiwww/taiko-web.git
synced 2024-10-22 17:05:49 +02:00
Fix charts with utf8-bom encoding
This commit is contained in:
parent
9aa7375287
commit
c5ce5104f1
@ -62,9 +62,12 @@ class GdriveFile{
|
|||||||
}
|
}
|
||||||
read(encoding){
|
read(encoding){
|
||||||
if(encoding){
|
if(encoding){
|
||||||
return this.arrayBuffer().then(response =>
|
return this.arrayBuffer().then(response => {
|
||||||
new TextDecoder(encoding).decode(response)
|
var reader = new FileReader()
|
||||||
)
|
var promise = pageEvents.load(reader).then(event => event.target.result)
|
||||||
|
reader.readAsText(new Blob([response]), encoding)
|
||||||
|
return promise
|
||||||
|
})
|
||||||
}else{
|
}else{
|
||||||
return gpicker.downloadFile(this.id)
|
return gpicker.downloadFile(this.id)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user