ywana-core8 0.0.840 → 0.0.842

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.840",
3
+ "version": "0.0.842",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -78,17 +78,18 @@ export const TaskContextProvider = (props) => {
78
78
  }
79
79
 
80
80
  function addListener(taskID, listener) {
81
- const next = { ...listeners, [taskID]: listener }
81
+ const next = Object.assign({}, listeners)
82
+ next[taskID] = listener
82
83
  setListeners(next)
83
84
  }
84
85
 
85
86
  function addListeners(newListeners) {
86
- const next = { ...listeners, ...newListeners }
87
+ const next = Object.assign({}, listeners, newListeners)
87
88
  setListeners(next)
88
89
  }
89
90
 
90
91
  function removeListener(taskID) {
91
- const next = { ...listeners }
92
+ const next = Object.assign({}, listeners)
92
93
  delete next[taskID]
93
94
  setListeners(next)
94
95
  }
@@ -105,6 +106,9 @@ export const TaskContextProvider = (props) => {
105
106
  removeListener
106
107
  };
107
108
 
109
+
110
+ console.log("TaskContextProvider", value, value.listeners.length)
111
+
108
112
  return (
109
113
  <TaskContext.Provider value={value}>
110
114
  {children}