summaryrefslogtreecommitdiff
path: root/lang/gjs/src/file.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lang/gjs/src/file.ts')
-rw-r--r--lang/gjs/src/file.ts6
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)
}
})