1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-13 01:58:44 +02:00

check for null path

This commit is contained in:
Kyle Spearrin 2018-08-29 09:35:10 -04:00
parent 42dbdb0043
commit 5db115ae43

View File

@ -117,10 +117,12 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService {
remote.dialog.showSaveDialog(remote.getCurrentWindow(), {
defaultPath: fileName,
showsTagField: false,
}, (filename) => {
fs.writeFile(filename, Buffer.from(blobData), (err) => {
// error check?
});
}, (path) => {
if (path != null) {
fs.writeFile(path, Buffer.from(blobData), (err) => {
// error check?
});
}
});
}