diff --git a/lib/pattern.ts b/lib/pattern.ts index dbe76f7a2f7..35c67906279 100644 --- a/lib/pattern.ts +++ b/lib/pattern.ts @@ -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); diff --git a/lib/svg.ts b/lib/svg.ts index 6b8b387b980..fc8ef8cd244 100644 --- a/lib/svg.ts +++ b/lib/svg.ts @@ -84,7 +84,7 @@ export class Svg { this.indent(); svg += this.nl()+this.style; this.outdent(); - svg += this.nl()+']]> >'+this.nl()+''+this.nl(); + svg += this.nl()+']]>'+this.nl()+''+this.nl(); return svg; } @@ -94,7 +94,7 @@ export class Svg { this.indent(); svg += this.nl()+this.script; this.outdent(); - svg += this.nl()+']]> >'+this.nl()+''+this.nl(); + svg += this.nl()+']]>'+this.nl()+''+this.nl(); return svg; }