🚧 Fixed a bug and two typos
This commit is contained in:
parent
7cc632ff45
commit
20e4ada666
2 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue