[gjs: 1/2] tweener: Fix a couple of warnings



commit 12f6d38bf2c1c4454f5c791978c1a56cbb884ca1
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Jun 13 06:10:23 2017 +0200

    tweener: Fix a couple of warnings
    
    Spidermonkey now warns when relying on the falsiness of undefined
    properties, so provide explicit fallbacks to avoid the warnings.

 modules/tweener/tweener.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/modules/tweener/tweener.js b/modules/tweener/tweener.js
index e0e48d9..8e27a54 100644
--- a/modules/tweener/tweener.js
+++ b/modules/tweener/tweener.js
@@ -537,9 +537,9 @@ function _addTweenOrCaller(target, tweeningParameters, isCaller) {
                                                         properties[istr].valueComplete,
                                                         properties[istr].arrayIndex || 0,
                                                         {},
-                                                        properties[istr].isSpecialProperty,
-                                                        properties[istr].modifierFunction,
-                                                        properties[istr].modifierParameters);
+                                                        properties[istr].isSpecialProperty || false,
+                                                        properties[istr].modifierFunction || null,
+                                                        properties[istr].modifierParameters || null);
             }
         }
 
@@ -548,7 +548,7 @@ function _addTweenOrCaller(target, tweeningParameters, isCaller) {
                                         _ticker.getTime() + (((delay * 1000) + (time * 1000)) / _timeScale),
                                         false,
                                         transition,
-                                        obj.transitionParams);
+                                        obj.transitionParams || null);
 
         tween.properties               =       isCaller ? null : copyProperties;
         tween.onStart                  =       obj.onStart;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]