Skip to content

Commit

Permalink
add variant.isVoid() check in fromVar function
Browse files Browse the repository at this point in the history
  • Loading branch information
benkuper committed Jun 23, 2024
1 parent 61a0309 commit 747d788
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/juce_core/javascript/juce_Javascript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ struct VariantConverter<choc::value::Value>
{
static choc::value::Value fromVar (const var& variant)
{
if (variant.isVoid())
return {};

if (variant.isInt())
return choc::value::Value { (int) variant };

Expand Down

0 comments on commit 747d788

Please sign in to comment.