mirror of
https://github.com/kevinhwang91/nvim-ufo
synced 2024-09-16 14:14:02 +02:00
Revert "fix(treesitter): should convert obj to string before matching (#203)"
This reverts commit 77e13c67f6
.
This commit is contained in:
parent
77e13c67f6
commit
239ae620d8
2 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ local function selectProviderWithChainByDefault()
|
|||
---@return Promise
|
||||
local function customizeSelector(bufnr)
|
||||
local function handleFallbackException(err, providerName)
|
||||
if tostring(err):match('UfoFallbackException') then
|
||||
if type(err) == 'string' and err:match('UfoFallbackException') then
|
||||
return require('ufo').getFolds(bufnr, providerName)
|
||||
else
|
||||
return require('promise').reject(err)
|
||||
|
|
|
@ -13,7 +13,7 @@ local Provider = {
|
|||
}
|
||||
|
||||
local function needFallback(reason)
|
||||
return tostring(reason):match('UfoFallbackException') ~= nil
|
||||
return type(reason) == 'string' and reason:match('UfoFallbackException')
|
||||
end
|
||||
|
||||
function Provider:getFunction(m)
|
||||
|
|
Loading…
Reference in a new issue