Skip to content

Commit

Permalink
fix(core): item reveal events not fired if initialising WowService wi…
Browse files Browse the repository at this point in the history
…th no arguments

Closes #19.
  • Loading branch information
MichaelNel authored and tinesoft committed Oct 9, 2018
1 parent 881b4a8 commit ec56d5e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/services/wow.service.ts
Expand Up @@ -43,13 +43,14 @@ export class NgwWowService {
}

init(config?: NgwWowConfig): void {
if (this.window) { // For Angular Universal suport
let conf = config || {};
// For Angular Universal support
if (this.window) {
let wowConfig = config || {};
// Set callback hook:
conf.callback = () => this.itemRevealedSource.next();
wowConfig.callback = () => this.itemRevealedSource.next();

// Initializes the library
new WOW(config).init();
new WOW(wowConfig).init();
}
}

Expand Down

0 comments on commit ec56d5e

Please sign in to comment.