1
0
Fork 0

🚧 Fixed a bug and two typos

This commit is contained in:
joostdecock 2018-07-18 14:48:49 +00:00
parent 7cc632ff45
commit 20e4ada666
2 changed files with 3 additions and 4 deletions

View file

@ -52,9 +52,8 @@ export class Pattern {
return this.svg.render(this);
}
/** Add hook */
on(hook, method): void {
if(typeof this.hooks._hooks[method] === 'undefined') {
if(typeof this.hooks._hooks[hook] === 'undefined') {
this.hooks._hooks[hook] = [];
}
this.hooks._hooks[hook].push(method);