Skip to content

Commit

Permalink
Data Ajax: Add the plugin only once
Browse files Browse the repository at this point in the history
* Fixes wet-boew#9198
* Partially-reverts wet-boew#6076
  • Loading branch information
EricDunsworth committed Oct 22, 2021
1 parent 31904af commit ee6e3c9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/plugins/data-ajax/data-ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ var componentName = "wb-data-ajax",
"append",
"prepend"
],
selectorsLength = selectors.length,
selector = selectors.join( "," ),
initEvent = "wb-init." + componentName,
updateEvent = "wb-update." + componentName,
contentUpdatedEvent = "wb-contentupdated",
$document = wb.doc,
s,

/**
* @method init
Expand Down Expand Up @@ -229,8 +227,6 @@ $document.on( "timerpoke.wb " + initEvent + " " + updateEvent + " ajax-fetched.w
} );

// Add the timerpoke to initialize the plugin
for ( s = 0; s !== selectorsLength; s += 1 ) {
wb.add( selectors[ s ] );
}
wb.add( selector );

} )( jQuery, window, wb );

0 comments on commit ee6e3c9

Please sign in to comment.