Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add an alert when reInitSlidesArray is used too late (after beforeInit)
  • Loading branch information
twitwi committed Apr 1, 2014
commit f4193effa0f94f942b66c7090e90c0196435c9d6
4 changes: 4 additions & 0 deletions core/deck.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ that use the API provided by core.
initSlidesArray(options.selectors.slides);
// Pre init event for preprocessing hooks
beforeInitEvent.done = function() {
// reInitSlidesArray is meant only for beforeInit
methods['reInitSlidesArray'] = function() {
alert('Deck.js method "reInitSlidesArray" is meant to be called in the beforeInit phase only.');
}
// re-populate the array of slides
slides = [];
initSlidesArray(options.selectors.slides);
Expand Down