ywana-core8 0.0.988 → 0.0.989

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.umd.js CHANGED
@@ -5515,11 +5515,13 @@
5515
5515
  url = _props$url === void 0 ? "/tasks" : _props$url,
5516
5516
  _props$frequency = props.frequency,
5517
5517
  frequency = _props$frequency === void 0 ? 1000 : _props$frequency,
5518
- children = props.children;
5518
+ children = props.children,
5519
+ ctx = props.ctx;
5519
5520
  var API = CollectionAPI$1(url, host, "");
5520
5521
  var _useState = React.useState({}),
5521
5522
  listeners = _useState[0],
5522
5523
  setListeners = _useState[1];
5524
+ var appContext = React.useContext(ctx);
5523
5525
  React.useEffect(function () {
5524
5526
  if (Object.keys(listeners).length === 0) return;
5525
5527
  var _interval = setInterval(function () {
@@ -5529,7 +5531,7 @@
5529
5531
  var taskID = taskIDs[i];
5530
5532
  return Promise.resolve(task(taskID)).then(function (tsk) {
5531
5533
  var listener = listeners[taskID];
5532
- if (listener) listener(tsk);
5534
+ if (listener) listener(tsk, appContext);
5533
5535
  });
5534
5536
  });
5535
5537
  return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);