Skip to content

Commit

Permalink
fix(api/application.js): fix bad 'window.update' check
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Jan 30, 2025
1 parent d95832f commit 7c0a759
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion api/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,9 @@ export async function getWindow (index, options) {
throwOnInvalidIndex(index)
const windows = await getWindows([index], options)
const window = windows[index]
await window.update()
if (window) {
await window.update()
}
return window
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/filesystem/resource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,10 @@ namespace ssc::runtime::filesystem {
this->pictures = Path(DIRECTORY_PATH_FROM_FILE_MANAGER(NSPicturesDirectory));
this->desktop = Path(DIRECTORY_PATH_FROM_FILE_MANAGER(NSDesktopDirectory));
this->videos = Path(DIRECTORY_PATH_FROM_FILE_MANAGER(NSMoviesDirectory));
this->config = Path(HOME + "/Library/Application Support/" + bundleIdentifier);
this->config = Path(DIRECTORY_PATH_FROM_FILE_MANAGER(NSApplicationSupportDirectory));
this->media = Path(DIRECTORY_PATH_FROM_FILE_MANAGER(NSSharedPublicDirectory));
this->music = Path(DIRECTORY_PATH_FROM_FILE_MANAGER(NSMusicDirectory));
this->home = Path(String(NSHomeDirectory().UTF8String));
//this->data = Path(HOME + "/Library/Application Support/" + bundleIdentifier);
this->data = Path(DIRECTORY_PATH_FROM_FILE_MANAGER(NSApplicationSupportDirectory));
this->log = Path(HOME + "/Library/Logs/" + bundleIdentifier);
this->tmp = Path(String(NSTemporaryDirectory().UTF8String));
Expand Down

0 comments on commit 7c0a759

Please sign in to comment.