1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +00:00

convert analytics and toaster to platform utils

This commit is contained in:
Kyle Spearrin
2018-10-03 10:33:04 -04:00
parent d4dd962193
commit 68ed8e51bd
21 changed files with 99 additions and 115 deletions

View File

@@ -129,7 +129,7 @@ export class ImportComponent implements OnInit {
reader.onload = (evt) => {
if (this.format === 'lastpasscsv' && file.type === 'text/html') {
const parser = new DOMParser();
const doc = parser.parseFromString(evt.target.result, 'text/html');
const doc = parser.parseFromString((evt.target as any).result, 'text/html');
const pre = doc.querySelector('pre');
if (pre != null) {
resolve(pre.textContent);
@@ -139,7 +139,7 @@ export class ImportComponent implements OnInit {
return;
}
resolve(evt.target.result);
resolve((evt.target as any).result);
};
reader.onerror = () => {
reject();