Skip to content

Commit

Permalink
fix: 添加todo
Browse files Browse the repository at this point in the history
  • Loading branch information
weixiangmeng521 committed Dec 26, 2023
1 parent 042e77a commit efa7231
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mwx47/teleport",
"version": "1.2.0",
"version": "1.2.1",
"description": "A library for managing and communicating events in your application through a singleton pattern. This pattern ensures that there is a single instance of the event manager, making it easy to coordinate and handle events across different parts of your codebase.",
"main": "./src/index.js",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/internal/teleport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,14 @@ export class TeleportSingleton {
this._multiEventsList.push(nameList);

const clearChildrenHandlers = nameList.map((eventName) => {
// TODO: 收集receive到的数据,储存到一个map里面,如果clear,就同时也clear掉里面的数据。
return this.receive(eventName, () => { });
});

// clear child handlers and father handler
const _this = this;
const clearAll = (names:string[], clearHandler:{clear: () => void}) => {
return { clear: () => {
_this._removeMultiEvent(names);
this._removeMultiEvent(names);
clearHandler.clear();
clearChildrenHandlers.forEach((childHandler) => { childHandler.clear() });
}}
Expand Down

0 comments on commit efa7231

Please sign in to comment.