utopia-ui 3.0.0-alpha.153 → 3.0.0-alpha.155

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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare type route = {
2
3
  path: string;
3
4
  icon: JSX.Element;
package/dist/index.js CHANGED
@@ -4965,11 +4965,6 @@ function OverlayItemProfileSettings() {
4965
4965
  item && setRelations(function (current) { return __spreadArray(__spreadArray([], current, true), [item], false); });
4966
4966
  });
4967
4967
  }, [item]);
4968
- useEffect(function () {
4969
- console.log(offers);
4970
- console.log(needs);
4971
- console.log(subname);
4972
- }, [offers, needs, subname]);
4973
4968
  var onUpdateItem = function () { return __awaiter(_this, void 0, void 0, function () {
4974
4969
  var changedItem, offer_updates, needs_updates, offers_state, needs_state;
4975
4970
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
@@ -4989,7 +4984,8 @@ function OverlayItemProfileSettings() {
4989
4984
  });
4990
4985
  needs_updates = [];
4991
4986
  needs === null || needs === void 0 ? void 0 : needs.map(function (n) {
4992
- var existingNeed = user === null || user === void 0 ? void 0 : user.needs.find(function (t) { return t.tags_id === n.id; });
4987
+ var _a;
4988
+ var existingNeed = (_a = item === null || item === void 0 ? void 0 : item.needs) === null || _a === void 0 ? void 0 : _a.find(function (t) { return t.tags_id === n.id; });
4993
4989
  existingNeed && needs_updates.push(existingNeed.id);
4994
4990
  !existingNeed && needs_updates.push({ items_id: item === null || item === void 0 ? void 0 : item.id, tags_id: n.id });
4995
4991
  !existingNeed && !tags.some(function (t) { return t.id === n.id; }) && addTag(__assign(__assign({}, n), { offer_or_need: true }));