mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-20 20:55:50 +00:00
plugin: lazily access settings() to help with testing
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
name. This isn't exactly best practice.
|
||||
]]
|
||||
|
||||
local Studio = settings():GetService("Studio")
|
||||
|
||||
local Rojo = script:FindFirstAncestor("Rojo")
|
||||
|
||||
local Roact = require(Rojo.Roact)
|
||||
@@ -82,6 +80,8 @@ function StudioProvider:render()
|
||||
end
|
||||
|
||||
function StudioProvider:didMount()
|
||||
local Studio = settings():GetService("Studio")
|
||||
|
||||
self.connection = Studio.ThemeChanged:Connect(function()
|
||||
self:updateTheme()
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user