@legendapp/state 3.0.0-alpha.40 → 3.0.0-alpha.41

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legendapp/state",
3
- "version": "3.0.0-alpha.40",
3
+ "version": "3.0.0-alpha.41",
4
4
  "description": "legend-state",
5
5
  "sideEffects": false,
6
6
  "private": false,
@@ -261,15 +261,17 @@ function syncedKeel(props) {
261
261
  if (realtime) {
262
262
  setupRealtime(props);
263
263
  }
264
- const subscribe = subscribeParam || (realtime ? (params) => {
264
+ const subscribe = realtime ? (params) => {
265
265
  let unsubscribe = void 0;
266
266
  state.when(subscribeFnKey$, () => {
267
267
  unsubscribe = subscribeFn(params);
268
268
  });
269
+ const unsubscribeParam = subscribeParam == null ? void 0 : subscribeParam(params);
269
270
  return () => {
270
271
  unsubscribe == null ? void 0 : unsubscribe();
272
+ unsubscribeParam == null ? void 0 : unsubscribeParam();
271
273
  };
272
- } : void 0);
274
+ } : subscribeParam;
273
275
  return crud.syncedCrud({
274
276
  ...rest,
275
277
  as: asType,
@@ -255,15 +255,17 @@ function syncedKeel(props) {
255
255
  if (realtime) {
256
256
  setupRealtime(props);
257
257
  }
258
- const subscribe = subscribeParam || (realtime ? (params) => {
258
+ const subscribe = realtime ? (params) => {
259
259
  let unsubscribe = void 0;
260
260
  when(subscribeFnKey$, () => {
261
261
  unsubscribe = subscribeFn(params);
262
262
  });
263
+ const unsubscribeParam = subscribeParam == null ? void 0 : subscribeParam(params);
263
264
  return () => {
264
265
  unsubscribe == null ? void 0 : unsubscribe();
266
+ unsubscribeParam == null ? void 0 : unsubscribeParam();
265
267
  };
266
- } : void 0);
268
+ } : subscribeParam;
267
269
  return syncedCrud({
268
270
  ...rest,
269
271
  as: asType,