fix: replace pause() with delayExecution() in updateBounds (#6038)#6166
Conversation
|
✅ All Jest tests passed! This PR is ready to merge. |
5bfd264 to
404876d
Compare
|
✅ All Jest tests passed! This PR is ready to merge. |
|
some changes are unrelated please remove |
|
✅ All Jest tests passed! This PR is ready to merge. |
Thanks for pointing that out. I have removed the unrelated changes and updated the PR so that it only contains the fix for replacing pause() with delayExecution() in updateBounds. |
|
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests: |
|
@piyushdotcomm lgtm |
|
Thanks for reviewing and merging the PR! I appreciate the feedback and look forward to contributing more to musicblocks. |
Summary
Fixes #6038
Root Cause
Block.updateCache()contains a retry loop calledupdateBoundsthat called
that.pause(delayTime)— butpause()was neverdefined on the Block class. This caused an uncaught promise
rejection that broke block rendering during collapse/expand
operations.
Fix
Replaced
that.pause(delayTime)withdelayExecution(delayTime)— the same global utility that
_createCache()already usescorrectly for the identical pattern.
Testing
Ran the block-related test suite — 34/34 tests pass:
Test Suites: 1 passed, 1 total
Tests: 34 passed, 34 total
PR Category