@contentful/field-editor-rich-text 2.3.15 → 2.3.18
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 +16 -0
- package/dist/field-editor-rich-text.cjs.development.js +8 -0
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +8 -0
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/package.json +3 -3
|
@@ -2161,6 +2161,10 @@ function useFetchedEntity(_ref) {
|
|
|
2161
2161
|
|
|
2162
2162
|
|
|
2163
2163
|
useEffect(function () {
|
|
2164
|
+
if (!store) {
|
|
2165
|
+
return;
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2164
2168
|
var newValue = store[id];
|
|
2165
2169
|
|
|
2166
2170
|
if (!areEqual(entity, newValue)) {
|
|
@@ -2169,6 +2173,10 @@ function useFetchedEntity(_ref) {
|
|
|
2169
2173
|
}, [store, entity, id]); // Fetch the entity if needed
|
|
2170
2174
|
|
|
2171
2175
|
useEffect(function () {
|
|
2176
|
+
if (!store) {
|
|
2177
|
+
return;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2172
2180
|
(type === 'Entry' ? getEntry : getAsset)(id); // "getEntry" and "getAsset" instances change with every
|
|
2173
2181
|
// entity store update causing page lag on initial load
|
|
2174
2182
|
// TODO: consider rewriting useEntities() hook to avoid that happening in
|