From 07c7b28c03120f49a4991b300687b13084b7635c Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Thu, 21 Mar 2019 22:35:30 -0700 Subject: [PATCH] Fix plugin unloading --- CHANGELOG.md | 1 + plugin/src/init.server.lua | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d56d892..dd59e202 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## [Unreleased] * Improved server instance ordering behavior when files are added during a live session ([#135](https://github.com/LPGhatguy/rojo/pull/135)) +* Fixed error being thrown when trying to unload the Rojo plugin. ## [0.5.0 Alpha 6](https://github.com/LPGhatguy/rojo/releases/tag/v0.5.0-alpha.6) (March 19, 2019) * Fixed `rojo init` giving unexpected results by upgrading to `rbx_dom_weak` 1.1.0 diff --git a/plugin/src/init.server.lua b/plugin/src/init.server.lua index b3b52bd0..08de686e 100644 --- a/plugin/src/init.server.lua +++ b/plugin/src/init.server.lua @@ -10,8 +10,8 @@ local app = Roact.createElement(App, { plugin = plugin, }) -Roact.mount(app, game:GetService("CoreGui"), "Rojo UI") +local tree = Roact.mount(app, game:GetService("CoreGui"), "Rojo UI") plugin.Unloading:Connect(function() - Roact.unmount(app) + Roact.unmount(tree) end) \ No newline at end of file