Skip to content

Commit 5fa1582

Browse files
committed
[[ Emscripten ]] Skip foreign type constructor check on emscripten
Type constructors not yet implemented on emscripten, preventing loading of cross-platform modules.
1 parent 14dbe69 commit 5fa1582

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libscript/src/script-module.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,9 @@ bool MCScriptEnsureModuleIsUsable(MCScriptModuleRef self)
809809
}
810810
else
811811
{
812+
#if defined(__EMSCRIPTEN__) // Skip foreign type constructor check on emscripten
813+
t_typeinfo = kMCNullTypeInfo;
814+
#else
812815
MCAutoStringRef t_type_func, t_args;
813816
if (!MCStringDivideAtChar(t_type->binding, ':', kMCStringOptionCompareExact, &t_type_func, &t_args))
814817
{
@@ -834,6 +837,7 @@ bool MCScriptEnsureModuleIsUsable(MCScriptModuleRef self)
834837
{
835838
goto error_cleanup;
836839
}
840+
#endif
837841
}
838842
}
839843
break;

0 commit comments

Comments
 (0)