ywana-core8 0.0.774 → 0.0.775

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/dist/index.cjs CHANGED
@@ -11062,16 +11062,10 @@ var TaskContextProvider = function TaskContextProvider(props) {
11062
11062
  var interval = setInterval(function () {
11063
11063
  try {
11064
11064
  return Promise.resolve(API.all()).then(function (tasks) {
11065
- // invoque listeners for each task
11066
- Object.entries(_listeners).forEach(function (_ref) {
11067
- var taskName = _ref[0],
11068
- listener = _ref[1];
11069
- var listenerTasks = tasks.filter(function (task) {
11070
- return task.name === taskName;
11071
- });
11072
- listenerTasks.forEach(function (task) {
11073
- return listener(task, value);
11074
- });
11065
+ // invoque listener for each task
11066
+ tasks.forEach(function (task) {
11067
+ var listener = _listeners[task.name || task.action];
11068
+ if (listener) listener(task);
11075
11069
  });
11076
11070
  });
11077
11071
  } catch (e) {