Skip to content

Commit b806ff6

Browse files
committed
checked the wrong argument...
1 parent 848d0e0 commit b806ff6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

modules/base/modules/modules.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void xs_modules_archive(xsMachine *the)
7070
void xs_modules_importNow(xsMachine *the)
7171
{
7272
char path[C_PATH_MAX];
73-
int what = ((xsToInteger(xsArgc) > 0) && xsTest(xsArg(0))) ? XS_IMPORT_NAMESPACE : XS_IMPORT_DEFAULT;
73+
int what = ((xsToInteger(xsArgc) > 1) && xsTest(xsArg(1))) ? XS_IMPORT_NAMESPACE : XS_IMPORT_DEFAULT;
7474

7575
xsToStringBuffer(xsArg(0), path, sizeof(path));
7676
xsResult = xsAwaitImport(path, what);

tools/testmc/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Object.defineProperty(globalThis, "screen", {
154154

155155
globalThis.$NETWORK = {
156156
get connected() {
157-
const WiFi = Modules.importNow("embedded:network/interface/wifi").default;
157+
const WiFi = Modules.importNow("embedded:network/interface/wifi");
158158

159159
assert(!!config.ssid, "Wi-Fi SSID missing");
160160
return new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)