mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
plugin: lazily access settings() to help with testing
This commit is contained in:
parent
65898125d0
commit
61c7ef3cb0
1 changed files with 2 additions and 2 deletions
|
|
@ -5,8 +5,6 @@
|
||||||
name. This isn't exactly best practice.
|
name. This isn't exactly best practice.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local Studio = settings():GetService("Studio")
|
|
||||||
|
|
||||||
local Rojo = script:FindFirstAncestor("Rojo")
|
local Rojo = script:FindFirstAncestor("Rojo")
|
||||||
|
|
||||||
local Roact = require(Rojo.Roact)
|
local Roact = require(Rojo.Roact)
|
||||||
|
|
@ -82,6 +80,8 @@ function StudioProvider:render()
|
||||||
end
|
end
|
||||||
|
|
||||||
function StudioProvider:didMount()
|
function StudioProvider:didMount()
|
||||||
|
local Studio = settings():GetService("Studio")
|
||||||
|
|
||||||
self.connection = Studio.ThemeChanged:Connect(function()
|
self.connection = Studio.ThemeChanged:Connect(function()
|
||||||
self:updateTheme()
|
self:updateTheme()
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue