Skip to content

Commit c7478b1

Browse files
committed
Fix race condition (again)
1 parent 48b37dd commit c7478b1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

webgpu/canvas.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def f():
4343

4444
debounced.timer = None
4545
debounced.t_last = None
46+
debounced._original = func
4647
return debounced
4748

4849
if callable(arg):
@@ -170,7 +171,7 @@ def on_intersection(observer_entry, args):
170171
func(html_canvas)
171172

172173
self.width = self.height = 0 # force resize
173-
self.resize()
174+
self.resize._original(self)
174175

175176
def on_resize(self, func: Callable):
176177
self._on_resize_callbacks.append(func)

0 commit comments

Comments
 (0)