From 6b66e61ee94bb6ee4704eb4bd5692d3f1f310801 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 11 Sep 2024 14:34:41 -0500 Subject: [PATCH] PolicyWorker: mock Deno.env --- src/workers/policy.worker.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/workers/policy.worker.ts b/src/workers/policy.worker.ts index 3fb4ef3f..1d65f405 100644 --- a/src/workers/policy.worker.ts +++ b/src/workers/policy.worker.ts @@ -6,6 +6,9 @@ import * as Comlink from 'comlink'; import { DittoDB } from '@/db/DittoDB.ts'; import { EventsDB } from '@/storages/EventsDB.ts'; +// @ts-ignore Don't try to access the env from this worker. +Deno.env = new Map(); + /** Serializable object the worker can use to set up the state. */ interface PolicyInit { /** Path to the policy module (https, jsr, file, etc) */