From 074774d9d6f4e7163691b40687c77ea00e369711 Mon Sep 17 00:00:00 2001 From: Andrew Morris Date: Sun, 25 Jun 2023 20:45:31 +1000 Subject: [PATCH] Fix valuescript_wasm --- valuescript_wasm/src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/valuescript_wasm/src/lib.rs b/valuescript_wasm/src/lib.rs index cc91224f..696e8c10 100644 --- a/valuescript_wasm/src/lib.rs +++ b/valuescript_wasm/src/lib.rs @@ -6,8 +6,10 @@ use std::{ use wasm_bindgen::prelude::*; use valuescript_compiler::{ - asm::Value, assemble, assembly_parser::AssemblyParser, compile as compile_internal, - CompileResult, Diagnostic, ResolvedPath, + asm::{Number, Value}, + assemble, + assembly_parser::AssemblyParser, + compile as compile_internal, CompileResult, Diagnostic, ResolvedPath, }; use valuescript_vm::{ vs_object::VsObject, @@ -184,7 +186,7 @@ impl TryToVal for Value { Value::Undefined => Val::Undefined, Value::Null => Val::Null, Value::Bool(b) => b.to_val(), - Value::Number(n) => n.to_val(), + Value::Number(Number(n)) => n.to_val(), Value::BigInt(n) => n.to_val(), Value::String(s) => s.to_val(), Value::Array(arr) => {