Open
Description
Cocos Creator version
3.8.6
System information
Web
Issue description
After PR #17188, unexpected parameter passing leads to endless errors in tween system.
It's easy to reproduce the problem through the following code.
Relevant error log output
Situation A
tween-action.ts:250 Uncaught TypeError: Cannot read properties of null (reading 'constructor')
at _loop (tween-action.ts:250:41)
at TweenAction.startWithTarget (tween-action.ts:237:37)
at Sequence.update (action-interval.ts:353:44)
at Sequence.step (action-interval.ts:145:14)
at ActionManager.update (action-manager.ts:499:49)
at TweenSystem.update (tween-system.ts:78:28)
at Director.tick (director.ts:783:38)
at Director.tick (utils.ts:23:9)
at Game._updateCallback (game.ts:1086:22)
at Pacer.updateCallback [as _callback] (pacer-web.ts:95:22)
Situation B
tween-action.ts:385 Uncaught TypeError: Cannot read properties of null (reading 'length')
at TweenAction.update (tween-action.ts:385:48)
at Sequence.update (action-interval.ts:355:21)
at Sequence.step (action-interval.ts:145:14)
at ActionManager.update (action-manager.ts:499:49)
at TweenSystem.update (tween-system.ts:78:28)
at Director.tick (director.ts:783:38)
at Game._updateCallback (game.ts:1086:22)
at Pacer.updateCallback [as _callback] (pacer-web.ts:95:22)
at Pacer._handleRAF (pacer-web.ts:126:22)
Steps to reproduce
Situation A
tween({ count: null }).to(1, { count: 3 }).start();
Situation B
tween({}).to(5, { value: 0 }).start();