diff options
| author | William Boman <william@redwill.se> | 2024-05-12 13:35:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-12 13:35:18 +0200 |
| commit | 1b3d60405d1d720b2c4927f19672e9479703b00f (patch) | |
| tree | a3a5bd7eab1046efa509309a704350270a4fc5f0 /lua | |
| parent | chore(registry): clean up recent changes (#1704) (diff) | |
| download | mason-1b3d60405d1d720b2c4927f19672e9479703b00f.tar mason-1b3d60405d1d720b2c4927f19672e9479703b00f.tar.gz mason-1b3d60405d1d720b2c4927f19672e9479703b00f.tar.bz2 mason-1b3d60405d1d720b2c4927f19672e9479703b00f.tar.lz mason-1b3d60405d1d720b2c4927f19672e9479703b00f.tar.xz mason-1b3d60405d1d720b2c4927f19672e9479703b00f.tar.zst mason-1b3d60405d1d720b2c4927f19672e9479703b00f.zip | |
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.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/mason-core/functional/type.lua | 4 |
1 files changed, 1 insertions, 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 _ |
