We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a71c12 commit 53dbddcCopy full SHA for 53dbddc
runtimes/js/src/runtime.rs
@@ -103,10 +103,11 @@ impl Runtime {
103
.get_or_init(|| Ok(Arc::new(init_runtime(false)?)))
104
.clone()?;
105
106
- let refs = TypeConstructorRefs {
107
- decimal: env.create_reference(options.type_constructors.decimal)?,
108
- };
109
- let _ = TYPE_CONSTRUCTORS.set(refs);
+ TYPE_CONSTRUCTORS.get_or_init(|| TypeConstructorRefs {
+ decimal: env
+ .create_reference(options.type_constructors.decimal)
+ .expect("couldn't create reference to Decimal"),
110
+ });
111
112
Ok(Self { runtime })
113
}
0 commit comments