Commit 529a9e4
committed
Fix mission file save error caused by fs module usage
Fixes the "fs is not defined" ReferenceError when saving mission files
from the Mission Control tab.
**Problem:**
- Legacy code was using Node.js fs.writeFile() directly from renderer
- fs module is not accessible in Electron's renderer process
- Users got error: "ReferenceError: fs is not defined" at line 4050
**Solution:**
- Replace fs.writeFile() with window.electronAPI.writeFile()
- Use Promise-based API (.then) instead of callback pattern
- Move success messages inside .then() block to ensure they execute
after file write completes
**Testing:**
- Configurator builds without errors
- Mission file save dialog opens correctly
- Files save successfully to selected location
- No console errors
Follows the same pattern used in cli.js and other tabs.1 parent 1a85fc5 commit 529a9e4
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4057 | 4057 | | |
4058 | 4058 | | |
4059 | 4059 | | |
4060 | | - | |
| 4060 | + | |
4061 | 4061 | | |
4062 | 4062 | | |
4063 | 4063 | | |
4064 | 4064 | | |
| 4065 | + | |
| 4066 | + | |
| 4067 | + | |
4065 | 4068 | | |
4066 | | - | |
4067 | | - | |
4068 | | - | |
4069 | 4069 | | |
4070 | 4070 | | |
4071 | 4071 | | |
| |||
0 commit comments