mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Electron update related: fix showSaveDialog elector api for deprecated callback (#21935)
* showSaveDialog * fix lint
This commit is contained in:
parent
394b468779
commit
8844d58595
@ -464,13 +464,13 @@ module.exports = class AtomWindow extends EventEmitter {
|
|||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let promise = dialog.showSaveDialog(this.browserWindow, options);
|
||||||
if (typeof callback === 'function') {
|
if (typeof callback === 'function') {
|
||||||
// Async
|
promise = promise.then(({ filePath, bookmark }) => {
|
||||||
dialog.showSaveDialog(this.browserWindow, options, callback);
|
callback(filePath, bookmark);
|
||||||
} else {
|
});
|
||||||
// Sync
|
|
||||||
return dialog.showSaveDialog(this.browserWindow, options);
|
|
||||||
}
|
}
|
||||||
|
return promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleDevTools() {
|
toggleDevTools() {
|
||||||
|
Loading…
Reference in New Issue
Block a user