@micromag/core 0.3.69 → 0.3.71
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/es/contexts.js +5 -3
- package/lib/contexts.js +5 -3
- package/package.json +2 -2
package/es/contexts.js
CHANGED
|
@@ -928,13 +928,15 @@ var useScreenDefinition = function useScreenDefinition() {
|
|
|
928
928
|
var intl = useIntl();
|
|
929
929
|
|
|
930
930
|
var _ref = useScreen() || {},
|
|
931
|
-
definition = _ref.definition
|
|
931
|
+
_ref$definition = _ref.definition,
|
|
932
|
+
definition = _ref$definition === void 0 ? null : _ref$definition;
|
|
932
933
|
|
|
933
934
|
var _ref2 = definition || {},
|
|
934
|
-
fields = _ref2.fields
|
|
935
|
+
_ref2$fields = _ref2.fields,
|
|
936
|
+
fields = _ref2$fields === void 0 ? null : _ref2$fields;
|
|
935
937
|
|
|
936
938
|
var finalFields = useMemo(function () {
|
|
937
|
-
return [].concat(_toConsumableArray(fields), [getScreenExtraField(intl)]);
|
|
939
|
+
return fields !== null ? [].concat(_toConsumableArray(fields), [getScreenExtraField(intl)]) : null;
|
|
938
940
|
}, [fields]);
|
|
939
941
|
return _objectSpread(_objectSpread({}, definition), {}, {
|
|
940
942
|
fields: finalFields
|
package/lib/contexts.js
CHANGED
|
@@ -963,13 +963,15 @@ var useScreenDefinition = function useScreenDefinition() {
|
|
|
963
963
|
var intl = reactIntl.useIntl();
|
|
964
964
|
|
|
965
965
|
var _ref = useScreen() || {},
|
|
966
|
-
definition = _ref.definition
|
|
966
|
+
_ref$definition = _ref.definition,
|
|
967
|
+
definition = _ref$definition === void 0 ? null : _ref$definition;
|
|
967
968
|
|
|
968
969
|
var _ref2 = definition || {},
|
|
969
|
-
fields = _ref2.fields
|
|
970
|
+
_ref2$fields = _ref2.fields,
|
|
971
|
+
fields = _ref2$fields === void 0 ? null : _ref2$fields;
|
|
970
972
|
|
|
971
973
|
var finalFields = React.useMemo(function () {
|
|
972
|
-
return [].concat(_toConsumableArray__default["default"](fields), [utils.getScreenExtraField(intl)]);
|
|
974
|
+
return fields !== null ? [].concat(_toConsumableArray__default["default"](fields), [utils.getScreenExtraField(intl)]) : null;
|
|
973
975
|
}, [fields]);
|
|
974
976
|
return _objectSpread__default["default"](_objectSpread__default["default"]({}, definition), {}, {
|
|
975
977
|
fields: finalFields
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.71",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -132,5 +132,5 @@
|
|
|
132
132
|
"publishConfig": {
|
|
133
133
|
"access": "public"
|
|
134
134
|
},
|
|
135
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "50093d0adc731dfb58656015179c4ac0b1c6765f"
|
|
136
136
|
}
|