Skip to content

Commit

Permalink
Use consistent prop name
Browse files Browse the repository at this point in the history
  • Loading branch information
boatbomber committed Jul 10, 2023
1 parent 106d84e commit 9b18cc3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions plugin/src/App/Components/PatchVisualizer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand All @@ -75,7 +75,7 @@ function PatchVisualizer:render()
)
end

tree:forEach(function(node, depth)
patchTree:forEach(function(node, depth)
drawNode(node, depth)
end)
end
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/App/StatusPages/Connected.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function ChangesDrawer:render()
transparency = self.props.transparency,
layoutOrder = 3,

tree = self.props.patchTree,
patchTree = self.props.patchTree,
}),
})
end)
Expand Down

0 comments on commit 9b18cc3

Please sign in to comment.