From 7f68d9887bd4bd75f0f4be301cb84134c3c31513 Mon Sep 17 00:00:00 2001 From: Sebastian Stachowicz <50264212+Sebastian2852@users.noreply.github.com> Date: Sat, 26 Jul 2025 00:27:11 +0200 Subject: [PATCH] Fixed nil -> nil props showing up as failing in patch visualizer (plugin) (#1081) --- CHANGELOG.md | 2 ++ plugin/src/Reconciler/diff.lua | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60b7c05b..de1c097a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,12 @@ # Rojo Changelog ## Unreleased +* Fixed nil -> nil properties showing up as failing to sync in plugin's patch visualizer ([#1081]) * Changed the background of the server's in-browser UI to be gray instead of white ([#1080]) * Fixed `Auto Connect Playtest Server` no longer functioning due to Roblox change ([#1066]) * Added an update indicator to the version header when a new version of the plugin is available. ([#1069]) +[#1081]: https://github.com/rojo-rbx/rojo/pull/1081 [#1080]: https://github.com/rojo-rbx/rojo/pull/1080 [#1049]: https://github.com/rojo-rbx/rojo/pull/1066 [#1069]: https://github.com/rojo-rbx/rojo/pull/1069 diff --git a/plugin/src/Reconciler/diff.lua b/plugin/src/Reconciler/diff.lua index 97760829..4a1d9361 100644 --- a/plugin/src/Reconciler/diff.lua +++ b/plugin/src/Reconciler/diff.lua @@ -25,6 +25,14 @@ local function trueEquals(a, b): boolean return true end + -- Treat nil and { Ref = "000...0" } as equal + if + (a == nil and type(b) == "table" and b.Ref == "00000000000000000000000000000000") + or (b == nil and type(a) == "table" and a.Ref == "00000000000000000000000000000000") + then + return true + end + local typeA, typeB = typeof(a), typeof(b) -- For tables, try recursive deep equality