Skip to content

Commit

Permalink
Bug fix for null vs falsey tween values
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcope committed Feb 14, 2024
1 parent 68ee26c commit fda6c7a
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 && valuesB[i]) {
if (target.isNumber && valuesB && valuesB[i] !== null) {
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] ? valuesB[i] : valuesA[i];
const value = valuesB && valuesB[i] !== null ? valuesB[i] : valuesA[i];

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

0 comments on commit fda6c7a

Please sign in to comment.