Skip to content

Commit

Permalink
ENYO-1097: Avoid assign unnecessary object but assign value directly.
Browse files Browse the repository at this point in the history
DCO-1.1-Signed-Off-By: Kunmyon Choi kunmyon.choi@lge.com
  • Loading branch information
KunmyonChoi authored and aarontam committed Mar 2, 2015
1 parent 129d097 commit a0a4d81
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions panels/source/Panels.js
Original file line number Diff line number Diff line change
Expand Up @@ -736,10 +736,12 @@
* @private
*/
fireTransitionFinish: function () {
var t = this.finishTransitionInfo || {fromIndex: null, toIndex: null};
if (this.hasNode() && (!t || (t.fromIndex != this.fromIndex || t.toIndex != this.toIndex))) {
var t = this.finishTransitionInfo,
fromIndex = t ? t.fromIndex : null,
toIndex = t ? t.toIndex : null;
if (this.hasNode() && (!t || (fromIndex != this.fromIndex || toIndex != this.toIndex))) {
if (this.transitionOnComplete) {
this.finishTransitionInfo = {fromIndex: t.toIndex, toIndex: this.lastIndex};
this.finishTransitionInfo = {fromIndex: toIndex, toIndex: this.lastIndex};
} else {
this.finishTransitionInfo = {fromIndex: this.lastIndex, toIndex: this.index};
}
Expand Down

0 comments on commit a0a4d81

Please sign in to comment.