Skip to content

Commit

Permalink
Skip null properties when tweening
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcope committed Feb 8, 2024
1 parent 4247040 commit 68ee26c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/components/CTweenMachine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ export default class CTweenMachine extends Component
const target = targets[i];
const property = target.property;

if (target.isNumber && valuesB) {
if (target.isNumber && valuesB && valuesB[i]) {
const vA = valuesA[i];
const vB = valuesB[i];
if (target.isArray) {
Expand All @@ -424,7 +424,7 @@ export default class CTweenMachine extends Component
}
}
else if (!valuesB || doSwitch) {
const value = valuesB ? valuesB[i] : valuesA[i];
const value = valuesB && valuesB[i] ? valuesB[i] : valuesA[i];

if (target.isArray) {
let changed = false;
Expand Down

0 comments on commit 68ee26c

Please sign in to comment.