1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Javascript: Convert void and undefined vars to correct QuickJS values

This commit is contained in:
attila 2024-07-05 17:18:16 +02:00
parent ced6347505
commit 9844687735

View file

@ -83,6 +83,12 @@ static qjs::JSValue juceToQuickJs (const var& v, qjs::JSContext* ctx)
{
using namespace qjs;
if (v.isVoid())
return JS_NULL;
if (v.isUndefined())
return JS_UNDEFINED;
if (v.isInt())
return JS_NewInt32 (ctx, static_cast<int> (v));
@ -180,7 +186,7 @@ static qjs::JSValue juceToQuickJs (const var& v, qjs::JSContext* ctx)
return result;
}
jassert (v.isVoid());
jassertfalse;
return JS_UNDEFINED;
}