From 1b3d60405d1d720b2c4927f19672e9479703b00f Mon Sep 17 00:00:00 2001 From: William Boman Date: Sun, 12 May 2024 13:35:18 +0200 Subject: fix: avoid calling vim.fn.has inside fast event (#1705) When this module is lazily required inside functional/init.lua we may be inside a fast event, causing the module to fail to load due to the top-level call to vim.fn.has. --- lua/mason-core/functional/type.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/mason-core/functional/type.lua b/lua/mason-core/functional/type.lua index b15a2025..a1880bba 100644 --- a/lua/mason-core/functional/type.lua +++ b/lua/mason-core/functional/type.lua @@ -11,8 +11,6 @@ _.is = fun.curryN(function(typ, value) return type(value) == typ end, 2) ----@param value any ----@return boolean -_.is_list = vim.fn.has "nvim-0.10" and vim.islist or vim.tbl_islist +_.is_list = vim.islist or vim.tbl_islist return _ -- cgit v1.2.3-70-g09d2