Skip to content

Commit 8e880ad

Browse files
authored
Merge pull request #2406 from 9999years/checkthirdparty-back-compat
Fix backwards compatability with `Lua.workspace.checkThirdParty`
2 parents 5a763b0 + 13a24ee commit 8e880ad

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

script/library.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,13 @@ local function check3rd(uri)
610610
end
611611
local checkThirdParty = config.get(uri, 'Lua.workspace.checkThirdParty')
612612
-- Backwards compatability: `checkThirdParty` used to be a boolean.
613-
if not checkThirdParty or checkThirdParty == 'Disable' then
613+
-- Note: `checkThirdParty` is defined as a string, so if a boolean is
614+
-- supplied, it's converted to a string by the `config.config` module.
615+
-- Hence we check for the strings `'true'` and `'false`' here, rather than
616+
-- the boolean literals.
617+
if checkThirdParty == 'Disable' or checkThirdParty == 'false' then
614618
return
615-
elseif checkThirdParty == true then
619+
elseif checkThirdParty == 'true' then
616620
checkThirdParty = 'Ask'
617621
end
618622
local scp = scope.getScope(uri)

0 commit comments

Comments
 (0)