diff options
author | Aylur <[email protected]> | 2024-12-25 02:38:27 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-12-25 02:38:27 +0100 |
commit | 37f0d24178a1516eb45eb639640e07c5dc3b8e81 (patch) | |
tree | 28ff8d1030be1919c00152e99b4ab9c229b0f01b /lang/gjs/src/file.ts | |
parent | 553b2186db47fb34602d4e949c1e40a018238d7a (diff) | |
parent | 0f2fefd2053203e1bfe4d66eb4e37dea07369890 (diff) |
Merge pull request #196 from Aylur/feat/jsx-gtk4
Add jsx support for gtk4
Diffstat (limited to 'lang/gjs/src/file.ts')
-rw-r--r-- | lang/gjs/src/file.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lang/gjs/src/file.ts b/lang/gjs/src/file.ts index 6ad8be3..4220d9d 100644 --- a/lang/gjs/src/file.ts +++ b/lang/gjs/src/file.ts @@ -12,8 +12,7 @@ export function readFileAsync(path: string): Promise<string> { Astal.read_file_async(path, (_, res) => { try { resolve(Astal.read_file_finish(res) || "") - } - catch (error) { + } catch (error) { reject(error) } }) @@ -29,8 +28,7 @@ export function writeFileAsync(path: string, content: string): Promise<void> { Astal.write_file_async(path, content, (_, res) => { try { resolve(Astal.write_file_finish(res)) - } - catch (error) { + } catch (error) { reject(error) } }) |