@contentful/field-editor-reference 5.1.5 → 5.1.6

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.
@@ -2052,6 +2052,9 @@ var _constate = /*#__PURE__*/constate(function useInitServices(props) {
2052
2052
 
2053
2053
  var currentSpaceId = props.sdk.ids.space;
2054
2054
  var currentEnvironmentId = (_props$sdk$ids$enviro = props.sdk.ids.environmentAlias) != null ? _props$sdk$ids$enviro : props.sdk.ids.environment;
2055
+ var environmentIds = useMemo(function () {
2056
+ return [props.sdk.ids.environmentAlias, props.sdk.ids.environment];
2057
+ }, [props.sdk.ids.environmentAlias, props.sdk.ids.environment]);
2055
2058
  var queryClient = useQueryClient();
2056
2059
  var queryCache = queryClient.getQueryCache();
2057
2060
  var entityChangeUnsubscribers = useRef({});
@@ -2206,9 +2209,9 @@ var _constate = /*#__PURE__*/constate(function useInitServices(props) {
2206
2209
  }, [fetch]);
2207
2210
  var isSameSpaceEntityQueryKey = useCallback(function (queryKey) {
2208
2211
  var isEntityKey = isEntityQueryKey(queryKey);
2209
- var isSameSpaceEntityKey = isEntityKey && queryKey[2] === currentSpaceId && queryKey[3] === currentEnvironmentId;
2212
+ var isSameSpaceEntityKey = isEntityKey && queryKey[2] === currentSpaceId && environmentIds.includes(queryKey[3]);
2210
2213
  return isSameSpaceEntityKey;
2211
- }, [currentSpaceId, currentEnvironmentId]); // @ts-expect-error ...
2214
+ }, [currentSpaceId, environmentIds]); // @ts-expect-error ...
2212
2215
 
2213
2216
  // @ts-expect-error ...
2214
2217
  var onEntityChanged = props.sdk.space.onEntityChanged;