From 9b18cc3ef9d8dd9ded4b431581ba5b52c47b0512 Mon Sep 17 00:00:00 2001 From: boatbomber Date: Mon, 10 Jul 2023 10:17:57 -0700 Subject: [PATCH] Use consistent prop name --- plugin/src/App/Components/PatchVisualizer/init.lua | 14 +++++++------- plugin/src/App/StatusPages/Connected.lua | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugin/src/App/Components/PatchVisualizer/init.lua b/plugin/src/App/Components/PatchVisualizer/init.lua index 877ccc807..73af45029 100644 --- a/plugin/src/App/Components/PatchVisualizer/init.lua +++ b/plugin/src/App/Components/PatchVisualizer/init.lua @@ -28,7 +28,7 @@ function PatchVisualizer:willUnmount() end function PatchVisualizer:shouldUpdate(nextProps) - if self.props.tree ~= nextProps.tree then + if self.props.patchTree ~= nextProps.patchTree then return true end @@ -41,18 +41,18 @@ function PatchVisualizer:shouldUpdate(nextProps) end function PatchVisualizer:render() - local tree = self.props.tree - if tree == nil and self.props.patch ~= nil then - tree = PatchTree.build(self.props.patch, self.props.instanceMap, self.props.changeListHeaders or { "Property", "Current", "Incoming" }) + local patchTree = self.props.patchTree + if patchTree == nil and self.props.patch ~= nil then + patchTree = PatchTree.build(self.props.patch, self.props.instanceMap, self.props.changeListHeaders or { "Property", "Current", "Incoming" }) if self.props.unappliedPatch then - tree = PatchTree.updateMetadata(tree, self.props.patch, self.props.instanceMap, self.props.unappliedPatch) + patchTree = PatchTree.updateMetadata(patchTree, self.props.patch, self.props.instanceMap, self.props.unappliedPatch) end end -- Recusively draw tree local scrollElements, elementHeights = {}, {} - if tree then + if patchTree then local function drawNode(node, depth) local elementHeight, setElementHeight = Roact.createBinding(30) table.insert(elementHeights, elementHeight) @@ -75,7 +75,7 @@ function PatchVisualizer:render() ) end - tree:forEach(function(node, depth) + patchTree:forEach(function(node, depth) drawNode(node, depth) end) end diff --git a/plugin/src/App/StatusPages/Connected.lua b/plugin/src/App/StatusPages/Connected.lua index 47fed7286..00f6822bb 100644 --- a/plugin/src/App/StatusPages/Connected.lua +++ b/plugin/src/App/StatusPages/Connected.lua @@ -83,7 +83,7 @@ function ChangesDrawer:render() transparency = self.props.transparency, layoutOrder = 3, - tree = self.props.patchTree, + patchTree = self.props.patchTree, }), }) end)