Skip to content
Snippets Groups Projects
Unverified Commit 13a24eef authored by Rebecca Turner's avatar Rebecca Turner
Browse files

Fix backwards compatability with `Lua.workspace.checkThirdParty`

I attempted to maintain backwards compatability in #2354 but didn't
fully understand the config type system.
parent 5a763b0c
No related branches found
No related tags found
No related merge requests found
...@@ -610,9 +610,13 @@ local function check3rd(uri) ...@@ -610,9 +610,13 @@ local function check3rd(uri)
end end
local checkThirdParty = config.get(uri, 'Lua.workspace.checkThirdParty') local checkThirdParty = config.get(uri, 'Lua.workspace.checkThirdParty')
-- Backwards compatability: `checkThirdParty` used to be a boolean. -- Backwards compatability: `checkThirdParty` used to be a boolean.
if not checkThirdParty or checkThirdParty == 'Disable' then -- Note: `checkThirdParty` is defined as a string, so if a boolean is
-- supplied, it's converted to a string by the `config.config` module.
-- Hence we check for the strings `'true'` and `'false`' here, rather than
-- the boolean literals.
if checkThirdParty == 'Disable' or checkThirdParty == 'false' then
return return
elseif checkThirdParty == true then elseif checkThirdParty == 'true' then
checkThirdParty = 'Ask' checkThirdParty = 'Ask'
end end
local scp = scope.getScope(uri) local scp = scope.getScope(uri)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment