From 55115d3592d9a3d4d3b900e3c457866a3bce7127 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 26 Feb 2025 18:14:42 -0600 Subject: [PATCH] PolicyWorker: move Deno.env set above imports --- packages/ditto/workers/policy.worker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ditto/workers/policy.worker.ts b/packages/ditto/workers/policy.worker.ts index 539830a5..6b7bbeef 100644 --- a/packages/ditto/workers/policy.worker.ts +++ b/packages/ditto/workers/policy.worker.ts @@ -1,3 +1,6 @@ +// @ts-ignore Don't try to access the env from this worker. +Deno.env = new Map(); + import { DittoPolyPg } from '@ditto/db'; import '@soapbox/safe-fetch/load'; import { NostrEvent, NostrRelayOK, NPolicy } from '@nostrify/nostrify'; @@ -6,9 +9,6 @@ import * as Comlink from 'comlink'; import { DittoPgStore } from '@/storages/DittoPgStore.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) */