aboutsummaryrefslogtreecommitdiff
path: root/src/lustre.ffi.mjs
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2023-07-19 11:46:37 +0100
committerHayleigh Thompson <me@hayleigh.dev>2023-07-19 11:46:37 +0100
commit410b190a13d6e0d5059f1ea719c60a41e69d9825 (patch)
treed9427bcc13ac9bce22d43202ae37d58589db67f6 /src/lustre.ffi.mjs
parentd70ba66fafb485c9d4541a503ff55f96c5c5255e (diff)
downloadlustre-410b190a13d6e0d5059f1ea719c60a41e69d9825.tar.gz
lustre-410b190a13d6e0d5059f1ea719c60a41e69d9825.zip
:recycle: Create the proper error type in javascript and save the pointless ffi wrapper.
Diffstat (limited to 'src/lustre.ffi.mjs')
-rw-r--r--src/lustre.ffi.mjs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lustre.ffi.mjs b/src/lustre.ffi.mjs
index b57026f..59fe49b 100644
--- a/src/lustre.ffi.mjs
+++ b/src/lustre.ffi.mjs
@@ -1,5 +1,6 @@
import { morph } from "./runtime.ffi.mjs";
import { Ok, Error } from "./gleam.mjs";
+import { ElementNotFound } from "./lustre.mjs";
import { map } from "./lustre/element.mjs";
// RUNTIME ---------------------------------------------------------------------
@@ -40,7 +41,7 @@ export class App {
return new Ok((msg) => this.dispatch(msg));
} catch (_) {
- return new Error(undefined);
+ return new Error(new ElementNotFound());
}
}