Skip to content

Commit ae628f9

Browse files
committed
to_evalue check for undefined
1 parent 47dbafc commit ae628f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

extension/wasm/wasm_bindings.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ class JsTensor {
266266

267267
// Converts JS value to EValue.
268268
EValue to_evalue(val v) {
269+
if (v.isUndefined()) {
270+
THROW_JS_ERROR(TypeError, "Value cannot be undefined");
271+
}
269272
if (v.isNull()) {
270273
return EValue();
271274
} else if (v.isNumber()) {

0 commit comments

Comments
 (0)