Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Initialize PRNG prior to before:prepare event
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixHenninger committed Jul 27, 2017
1 parent a8a9b33 commit 3bd6682
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/library/src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ export class Component extends EventHandler {
// Save reference to topmost component in the hierarchy
this.internals.root = this.parents[0]

// Setup PRNG
this.random = new Random(this.options.random)

// Trigger the before:prepare event
await this.triggerMethod('before:prepare')

Expand All @@ -206,9 +209,6 @@ export class Component extends EventHandler {
parsedOptions,
)

// Setup PRNG
this.random = new Random(this.options.random)

// Setup automatic event handling for responses
Object.keys(this.options.responses).forEach(
(eventString) => {
Expand Down

0 comments on commit 3bd6682

Please sign in to comment.