mobx 6.3.12 → 6.3.13
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/CHANGELOG.md +6 -0
- package/dist/mobx.cjs.development.js +11 -4
- package/dist/mobx.cjs.development.js.map +1 -1
- package/dist/mobx.cjs.production.min.js +1 -1
- package/dist/mobx.cjs.production.min.js.map +1 -1
- package/dist/mobx.esm.development.js +11 -4
- package/dist/mobx.esm.development.js.map +1 -1
- package/dist/mobx.esm.js +11 -4
- package/dist/mobx.esm.js.map +1 -1
- package/dist/mobx.esm.production.min.js +1 -1
- package/dist/mobx.esm.production.min.js.map +1 -1
- package/dist/mobx.umd.development.js +11 -4
- package/dist/mobx.umd.development.js.map +1 -1
- package/dist/mobx.umd.production.min.js +1 -1
- package/dist/mobx.umd.production.min.js.map +1 -1
- package/package.json +1 -1
- package/src/types/flowannotation.ts +11 -3
|
@@ -737,7 +737,7 @@
|
|
|
737
737
|
// bound - must annotate protos to support super.flow()
|
|
738
738
|
|
|
739
739
|
|
|
740
|
-
if ((_this$options_ = this.options_) != null && _this$options_.bound && !isFlow(adm.target_[key])) {
|
|
740
|
+
if ((_this$options_ = this.options_) != null && _this$options_.bound && (!hasProp(adm.target_, key) || !isFlow(adm.target_[key]))) {
|
|
741
741
|
if (this.extend_(adm, key, descriptor, false) === null) return 0
|
|
742
742
|
/* Cancel */
|
|
743
743
|
;
|
|
@@ -781,16 +781,23 @@
|
|
|
781
781
|
}
|
|
782
782
|
|
|
783
783
|
assertFlowDescriptor(adm, annotation, key, descriptor);
|
|
784
|
-
var value = descriptor.value;
|
|
784
|
+
var value = descriptor.value; // In case of flow.bound, the descriptor can be from already annotated prototype
|
|
785
|
+
|
|
786
|
+
if (!isFlow(value)) {
|
|
787
|
+
value = flow(value);
|
|
788
|
+
}
|
|
785
789
|
|
|
786
790
|
if (bound) {
|
|
787
791
|
var _adm$proxy_;
|
|
788
792
|
|
|
789
|
-
|
|
793
|
+
// We do not keep original function around, so we bind the existing flow
|
|
794
|
+
value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_); // This is normally set by `flow`, but `bind` returns new function...
|
|
795
|
+
|
|
796
|
+
value.isMobXFlow = true;
|
|
790
797
|
}
|
|
791
798
|
|
|
792
799
|
return {
|
|
793
|
-
value:
|
|
800
|
+
value: value,
|
|
794
801
|
// Non-configurable for classes
|
|
795
802
|
// prevents accidental field redefinition in subclass
|
|
796
803
|
configurable: safeDescriptors ? adm.isPlainObject_ : true,
|