mobx 6.3.1 → 6.3.2

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.
@@ -864,7 +864,7 @@ function createAutoAnnotation(options) {
864
864
  }
865
865
 
866
866
  function make_$5(adm, key, descriptor, source) {
867
- var _this$options_2, _this$options_3;
867
+ var _this$options_3, _this$options_4;
868
868
 
869
869
  // getter -> computed
870
870
  if (descriptor.get) {
@@ -899,22 +899,25 @@ function make_$5(adm, key, descriptor, source) {
899
899
 
900
900
 
901
901
  if (source !== adm.target_ && typeof descriptor.value === "function") {
902
- var _this$options_;
902
+ var _this$options_2;
903
903
 
904
904
  if (isGenerator(descriptor.value)) {
905
- return flow.make_(adm, key, descriptor, source);
905
+ var _this$options_;
906
+
907
+ var flowAnnotation = ((_this$options_ = this.options_) == null ? void 0 : _this$options_.autoBind) ? flow.bound : flow;
908
+ return flowAnnotation.make_(adm, key, descriptor, source);
906
909
  }
907
910
 
908
- var actionAnnotation = ((_this$options_ = this.options_) == null ? void 0 : _this$options_.autoBind) ? autoAction.bound : autoAction;
911
+ var actionAnnotation = ((_this$options_2 = this.options_) == null ? void 0 : _this$options_2.autoBind) ? autoAction.bound : autoAction;
909
912
  return actionAnnotation.make_(adm, key, descriptor, source);
910
913
  } // other -> observable
911
914
  // Copy props from proto as well, see test:
912
915
  // "decorate should work with Object.create"
913
916
 
914
917
 
915
- var observableAnnotation = ((_this$options_2 = this.options_) == null ? void 0 : _this$options_2.deep) === false ? observable.ref : observable; // if function respect autoBind option
918
+ var observableAnnotation = ((_this$options_3 = this.options_) == null ? void 0 : _this$options_3.deep) === false ? observable.ref : observable; // if function respect autoBind option
916
919
 
917
- if (typeof descriptor.value === "function" && ((_this$options_3 = this.options_) == null ? void 0 : _this$options_3.autoBind)) {
920
+ if (typeof descriptor.value === "function" && ((_this$options_4 = this.options_) == null ? void 0 : _this$options_4.autoBind)) {
918
921
  var _adm$proxy_;
919
922
 
920
923
  descriptor.value = descriptor.value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);
@@ -924,7 +927,7 @@ function make_$5(adm, key, descriptor, source) {
924
927
  }
925
928
 
926
929
  function extend_$5(adm, key, descriptor, proxyTrap) {
927
- var _this$options_4, _this$options_5;
930
+ var _this$options_5, _this$options_6;
928
931
 
929
932
  // getter -> computed
930
933
  if (descriptor.get) {
@@ -942,13 +945,13 @@ function extend_$5(adm, key, descriptor, proxyTrap) {
942
945
  // if function respect autoBind option
943
946
 
944
947
 
945
- if (typeof descriptor.value === "function" && ((_this$options_4 = this.options_) == null ? void 0 : _this$options_4.autoBind)) {
948
+ if (typeof descriptor.value === "function" && ((_this$options_5 = this.options_) == null ? void 0 : _this$options_5.autoBind)) {
946
949
  var _adm$proxy_2;
947
950
 
948
951
  descriptor.value = descriptor.value.bind((_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_);
949
952
  }
950
953
 
951
- var observableAnnotation = ((_this$options_5 = this.options_) == null ? void 0 : _this$options_5.deep) === false ? observable.ref : observable;
954
+ var observableAnnotation = ((_this$options_6 = this.options_) == null ? void 0 : _this$options_6.deep) === false ? observable.ref : observable;
952
955
  return observableAnnotation.extend_(adm, key, descriptor, proxyTrap);
953
956
  }
954
957