Opened 7 years ago

Closed 7 years ago

#14563 closed defect (duplicate)

Error after build

Reported by: szarouski Owned by: Rawld Gill
Priority: high Milestone: tbd
Component: BuildSystem Version: 1.7.1
Keywords: build, function, replace, optimization Cc:
Blocked By: Blocking:

Description

Hello, I have following code:

play: function _play(slider, interval) {
  if(!_play.player){
      _play.player = dojo.hitch(this, function() {
      var activePage = slider.pager.pages.filter('.'+this.activePageClass);
      if(activePage.next().length) {//use particular link
        this.slideTo(slider, activePage.next().children('a')[0]);
      } else {//use first link
        this.slideTo(slider, slider.pager.pages.children('a')[0]);
      }
    });
  }

  slider.interval = setInterval(_play.player, interval || this.defaultInterval);
}

once I run build tool output code will look like this:

play:function _play(_62,_63){
if(!_64.player){
_64.player=dojo.hitch(this,function(){
var _65=_62.pager.pages.filter("."+this.activePageClass);
if(_65.next().length){
this.slideTo(_62,_65.next().children("a")[0]);
}else{
this.slideTo(_62,_62.pager.pages.children("a")[0]);
}
});
}
_62.interval=setInterval(_64.player,_63||this.defaultInterval);
}

you can see that _play was replaced with _64 and because it wasn't defined and it doesn't have property player I'm getting error.

Hopefully you will find solution, sorry if someone already posted similar bug.

Thanks

Change History (1)

comment:1 Changed 7 years ago by ben hockey

Resolution: duplicate
Status: newclosed

this is a problem with shrinksafe. closing this as a duplicate of #11673. you might want to try closure as the optimizer and see if your problem still exists.

Note: See TracTickets for help on using tickets.