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