react-crud-mobile 1.3.276 → 1.3.278

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.
@@ -2288,19 +2288,17 @@ function UIElement(props) {
2288
2288
  scope.update();
2289
2289
  };
2290
2290
  scope.dialogHide = function (args) {
2291
- var _main$dialog;
2291
+ var _next$scope, _current$scope;
2292
2292
  var main = ViewUtils.getCrud('view');
2293
2293
  var current = main.dialog;
2294
2294
  var next = Utils.nvl(main.parent, null);
2295
2295
  main.dialog = next;
2296
2296
  scope.currentDialog = next;
2297
- if ((_main$dialog = main.dialog) != null && (_main$dialog = _main$dialog.crud) != null && _main$dialog.scope) {
2298
- var _main$dialog2;
2299
- (_main$dialog2 = main.dialog) == null || _main$dialog2.crud.scope.update();
2300
- }
2301
- if (current != null && current.scope) {
2297
+ var nextScope = next == null || (_next$scope = next.scope) == null ? void 0 : _next$scope.parent;
2298
+ var currScope = current == null || (_current$scope = current.scope) == null ? void 0 : _current$scope.parent;
2299
+ if (currScope) {
2302
2300
  var close = current.close;
2303
- current.scope.update();
2301
+ currScope.update();
2304
2302
  if (close) {
2305
2303
  if (close != null && close.debug) console.log('Fechando');
2306
2304
  current.scope.call('close', {
@@ -2308,8 +2306,8 @@ function UIElement(props) {
2308
2306
  });
2309
2307
  }
2310
2308
  }
2311
- if (next.scope.update()) {
2312
- next.scope.update();
2309
+ if (nextScope) {
2310
+ nextScope.update();
2313
2311
  }
2314
2312
  };
2315
2313
  return /*#__PURE__*/jsx(CrudContext.Provider, {