Fix tooltips crashing on thread cancellation edge cases (#727)

This commit is contained in:
boatbomber
2023-07-12 10:01:21 -07:00
committed by GitHub
parent 80eb14f9da
commit 28d48a76e3

View File

@@ -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()
@@ -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)