Skip to content

Commit

Permalink
Fix throttling of init event (#554) (#556)
Browse files Browse the repository at this point in the history
* call original unthrottled function for the `init` event
  • Loading branch information
SHOTA authored and davidjbradshaw committed Jan 21, 2018
1 parent b591c20 commit 9af659e
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 9af659e

Please sign in to comment.