Skip to content

Commit bdcb15f

Browse files
committed
Tween.to and Tween.from can now accept null as the ease parameter value. If null it will use the default tween, as per the documentation (thanks @nkovacs phaserjs#1817)
1 parent 7195f5f commit bdcb15f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/tween/Tween.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Phaser.Tween.prototype = {
189189
to: function (properties, duration, ease, autoStart, delay, repeat, yoyo) {
190190

191191
if (typeof duration === 'undefined' || duration <= 0) { duration = 1000; }
192-
if (typeof ease === 'undefined') { ease = Phaser.Easing.Default; }
192+
if (typeof ease === 'undefined' || ease === null) { ease = Phaser.Easing.Default; }
193193
if (typeof autoStart === 'undefined') { autoStart = false; }
194194
if (typeof delay === 'undefined') { delay = 0; }
195195
if (typeof repeat === 'undefined') { repeat = 0; }
@@ -236,7 +236,7 @@ Phaser.Tween.prototype = {
236236
from: function (properties, duration, ease, autoStart, delay, repeat, yoyo) {
237237

238238
if (typeof duration === 'undefined') { duration = 1000; }
239-
if (typeof ease === 'undefined') { ease = Phaser.Easing.Default; }
239+
if (typeof ease === 'undefined' || ease === null) { ease = Phaser.Easing.Default; }
240240
if (typeof autoStart === 'undefined') { autoStart = false; }
241241
if (typeof delay === 'undefined') { delay = 0; }
242242
if (typeof repeat === 'undefined') { repeat = 0; }

0 commit comments

Comments
 (0)