Skip to content

Commit

Permalink
Fix plugin typechecking
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Sep 4, 2023
1 parent dc1f26c commit ddc5dfb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin/src/init.server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ local AnalyticsService = game:GetService("AnalyticsService")

local Settings = nil :: any

local SettingsModule = AnalyticsService:FindFirstChild("LuauLSP_Settings")
local SettingsModule = AnalyticsService:FindFirstChild("LuauLSP_Settings") :: ModuleScript
if not SettingsModule then
SettingsModule = script.DefaultSettings:Clone()
SettingsModule = (script :: any).DefaultSettings:Clone()
assert(SettingsModule, "Luau Typechecking")
SettingsModule.Name = "LuauLSP_Settings"
SettingsModule.Parent = AnalyticsService
end
assert(SettingsModule, "failed to create settings module")

local function LoadSettings()
local result, parseError: any = loadstring(SettingsModule.Source)
Expand Down

0 comments on commit ddc5dfb

Please sign in to comment.