Skip to content

Commit

Permalink
Fix tooltips crashing on thread cancellation edge cases (#727)
Browse files Browse the repository at this point in the history
  • Loading branch information
boatbomber authored Jul 12, 2023
1 parent 80eb14f commit 28d48a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/src/App/Components/Tooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ end

function Trigger:willUnmount()
if self.showDelayThread then
task.cancel(self.showDelayThread)
pcall(task.cancel, self.showDelayThread)
end
if self.destroy then
self.destroy()
Expand Down Expand Up @@ -225,7 +225,7 @@ function Trigger:managePopup()
end)
else
if self.showDelayThread then
task.cancel(self.showDelayThread)
pcall(task.cancel, self.showDelayThread)
self.showDelayThread = nil
end
self.props.context.removeTip(self.id)
Expand Down

0 comments on commit 28d48a7

Please sign in to comment.