From 61c7ef3cb0a7c9ce2eef78b1dc76472ca00822a8 Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Sat, 20 Jun 2020 21:50:14 -0700 Subject: [PATCH] plugin: lazily access settings() to help with testing --- plugin/src/Components/Theme.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/src/Components/Theme.lua b/plugin/src/Components/Theme.lua index ebd46015..7cee972d 100644 --- a/plugin/src/Components/Theme.lua +++ b/plugin/src/Components/Theme.lua @@ -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)