From 53c1d90ede2129df5ad9f47664806048092b784e Mon Sep 17 00:00:00 2001 From: Alex Silva Date: Thu, 25 Feb 2021 16:44:11 -0600 Subject: [PATCH] Update aframe-animation-timeline-component.js Bug: - When you try to modify the loop property value via script, if you set the value to true (boolean type), the result is loop = NaN Expected Behaviour: - When you try to modify the loop property value via script, if you set the value to true (boolean type), the result is loop = true. Solution: - Add a validation for the property loop asking if the value provides is already boolean, if it is, then return it without furter actions. --- .../dist/aframe-animation-timeline-component.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/animation-timeline/dist/aframe-animation-timeline-component.js b/components/animation-timeline/dist/aframe-animation-timeline-component.js index 431058ff..8f4e6b9d 100644 --- a/components/animation-timeline/dist/aframe-animation-timeline-component.js +++ b/components/animation-timeline/dist/aframe-animation-timeline-component.js @@ -54,7 +54,9 @@ loop: { default: 0, parse: function (value) { - // Boolean or integer. + // boolean + if(typeof value === 'boolean'){ return value; } + // String or integer. if (value === 'true') { return true; } if (value === 'false') { return false; } return parseInt(value, 10);