diff --git a/index.html b/index.html index a3b5be9..1a7d7ad 100644 --- a/index.html +++ b/index.html @@ -1,11 +1,9 @@
diff --git a/package.json b/package.json index cae8ea3..7823731 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ztimson/utils", - "version": "0.26.5", + "version": "0.26.6", "description": "Utility library", "author": "Zak Timson", "license": "MIT", diff --git a/src/path-events.ts b/src/path-events.ts index 599b91a..8d312df 100644 --- a/src/path-events.ts +++ b/src/path-events.ts @@ -325,10 +325,13 @@ export class PathEventEmitter implements IPathEventEmitter{ } on(event: Event | Event[], listener: PathListener): PathUnsubscribe { - makeArray(event).forEach(e => this.listeners.push([ - e instanceof PathEvent ? e : new PathEvent(`${this.prefix}/${e}`), - listener - ])); + makeArray(event).forEach(e => { + if(typeof e == 'string' && e[0] == '*' && this.prefix) e = e.slice(1); + this.listeners.push([ + e instanceof PathEvent ? e : new PathEvent(`${this.prefix}/${e}`), + listener + ]) + }); return () => this.off(listener); }