mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
code is wrong and unused, so delete
it is wrong in the way that it does not always return a string
This commit is contained in:
parent
6921e9cd21
commit
b43754da6a
@ -107,20 +107,6 @@ export class BlobHandle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async readAsText() {
|
|
||||||
if (this._buffer) {
|
|
||||||
return this._buffer;
|
|
||||||
} else {
|
|
||||||
const reader = new FileReader();
|
|
||||||
const promise = new Promise((resolve, reject) => {
|
|
||||||
reader.addEventListener("load", evt => resolve(evt.target.result));
|
|
||||||
reader.addEventListener("error", evt => reject(evt.target.error));
|
|
||||||
});
|
|
||||||
reader.readAsText(this._blob, "utf-8");
|
|
||||||
return promise;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
get url() {
|
get url() {
|
||||||
if (!this._url) {
|
if (!this._url) {
|
||||||
this._url = URL.createObjectURL(this._blob);
|
this._url = URL.createObjectURL(this._blob);
|
||||||
|
Loading…
Reference in New Issue
Block a user