From 02a6542dc0b853e855ca42b687717a8a10126b06 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 7 Mar 2024 08:41:15 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20bug=20stopping=20Ollama=20?= =?UTF-8?q?autodetect=20from=20working?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/util/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/util/index.ts b/core/util/index.ts index 1a7312e3ff..65f602d8ef 100644 --- a/core/util/index.ts +++ b/core/util/index.ts @@ -187,5 +187,6 @@ export function getMarkdownLanguageTagForFile(filepath: string): string { } export function copyOf(obj: any): any { + if (obj === null || obj === undefined) return obj; return JSON.parse(JSON.stringify(obj)); }