Skip to content

Commit

Permalink
Fix throttling of init event (davidjbradshaw#554)
Browse files Browse the repository at this point in the history
* call original unthrottled function for the `init` event
  • Loading branch information
Shota Senga committed Jan 16, 2018
1 parent 2b2df4b commit cc388d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/iframeResizer.contentWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,11 @@

if (!isDoubleFiredEvent()){
recordTrigger();
sizeIFrameThrottled(triggerEvent, triggerEventDesc, customHeight, customWidth);
if (triggerEvent in {'init':1}){
sizeIFrame(triggerEvent, triggerEventDesc, customHeight, customWidth);
} else {
sizeIFrameThrottled(triggerEvent, triggerEventDesc, customHeight, customWidth);
}
} else {
log('Trigger event cancelled: '+triggerEvent);
}
Expand Down

0 comments on commit cc388d1

Please sign in to comment.