From 76fcb6ebf32bfb95087f0660e48f5a0bb227dc9a Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 1 Nov 2024 17:00:01 +0100 Subject: [PATCH] fix(tests): create core if not existent --- lua/care/menu/confirm.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/care/menu/confirm.lua b/lua/care/menu/confirm.lua index 1300f86..a36026c 100644 --- a/lua/care/menu/confirm.lua +++ b/lua/care/menu/confirm.lua @@ -93,8 +93,10 @@ return function(entry) end unblock() vim.schedule(function() - require("care").core.context = - require("care.context").new(require("care").core and require("care").core.context or nil) + if not require("care").core then + require("care").core = require("care.core").new() + end + require("care").core.context = require("care.context").new(require("care").core.context) require("care").core:complete(3) end) end