From 60e096014d55883332c198f93dd38c0db939ade3 Mon Sep 17 00:00:00 2001 From: Pascal Vorwerk Date: Mon, 29 Jan 2024 00:29:17 +0100 Subject: [PATCH] fix: handle case were no Durable Objects are configured Signed-off-by: Pascal Vorwerk --- index.ts | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 6e3ed24..fdd4e1b 100644 --- a/index.ts +++ b/index.ts @@ -334,7 +334,7 @@ class CloudflareEmulator implements Emulator { this.miniflare = new Miniflare({ script: `export default {async fetch() {return new Response("Hello world!");}};` + - script.outputFiles[0].text, + script.outputFiles[0]?.text, modules: true, cache: true, kvNamespaces: env.kv, diff --git a/package.json b/package.json index cf7237a..736f8c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fossoreslp/sveltekit-adapter-cloudflare", - "version": "5.0.0", + "version": "5.0.1", "description": "Adapter for building SvelteKit applications on Cloudflare Pages with Workers integration", "repository": { "type": "git",