mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 14:15:50 -06:00
Fix "save" when hitting cancel (#175)
This commit is contained in:
parent
20819de675
commit
bfb83a16f9
1 changed files with 3 additions and 1 deletions
|
|
@ -15,7 +15,9 @@ class Notepad extends Component {
|
|||
|
||||
save() {
|
||||
const filename = Dialog('Save');
|
||||
fs.writeFileSync(filename, this.state.text);
|
||||
if (filename) {
|
||||
fs.writeFileSync(filename, this.state.text);
|
||||
}
|
||||
}
|
||||
|
||||
open() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue