diff --git a/scripts/index.ts b/scripts/index.ts index d6476dc6..fa5e0f7a 100644 --- a/scripts/index.ts +++ b/scripts/index.ts @@ -30,11 +30,11 @@ export async function runBuild(rootDir: string, isDev: boolean, generateApi: boo async function createRootPackage(opts: BuildOptions) { if (opts.isDev) { - await emptyDir(opts.distDir); - await emptyDir(opts.distTestsDir); - } else { await ensureDir(opts.distDir); await ensureDir(opts.distTestsDir); + } else { + await emptyDir(opts.distDir); + await emptyDir(opts.distTestsDir); } await ensureDir(opts.distIntegrationDir); diff --git a/src/lib/web-worker/worker-proxy.ts b/src/lib/web-worker/worker-proxy.ts index fc72fed3..7dfdcd68 100644 --- a/src/lib/web-worker/worker-proxy.ts +++ b/src/lib/web-worker/worker-proxy.ts @@ -134,13 +134,20 @@ export const callMethod = ( immediateSetters?: ImmediateSetter[], newInstanceId?: number ) => { - applyBeforeSyncSetters(instance[WinIdKey], instance); + const winId = instance[WinIdKey]; + applyBeforeSyncSetters(winId, instance); + + args.forEach((arg) => { + if (arg) { + applyBeforeSyncSetters(winId, arg); + } + }); const rtn = queueTask( instance, AccessType.CallMethod, memberPath, - serializeForMain(instance[WinIdKey], instance[InstanceIdKey], args), + serializeForMain(winId, instance[InstanceIdKey], args), immediateSetters, newInstanceId ); diff --git a/tests/platform/node/index.html b/tests/platform/node/index.html index 7b4b5ec4..6fc0b6ba 100644 --- a/tests/platform/node/index.html +++ b/tests/platform/node/index.html @@ -174,6 +174,19 @@
+
+