@bcrumbs.net/inbox 0.0.45 → 0.0.46

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/index.cjs.js CHANGED
@@ -70342,7 +70342,7 @@ function useTracking() {
70342
70342
  } = useCurrentUser();
70343
70343
  React.useEffect(() => {
70344
70344
  if (!(id && posthog)) {
70345
- return undefined;
70345
+ return;
70346
70346
  }
70347
70347
  posthog.identify(id, {
70348
70348
  email
@@ -70352,6 +70352,9 @@ function useTracking() {
70352
70352
  const trackPageView = () => {
70353
70353
  posthog.capture('$pageview');
70354
70354
  };
70355
+ if (!history) {
70356
+ return;
70357
+ }
70355
70358
  const historyApi = history;
70356
70359
  const unlistenOrUnsubscribe = typeof historyApi.listen === 'function' ? historyApi.listen(trackPageView) : typeof historyApi.subscribe === 'function' ? historyApi.subscribe(trackPageView) : undefined;
70357
70360
  return () => {
package/index.esm.js CHANGED
@@ -70324,7 +70324,7 @@ function useTracking() {
70324
70324
  } = useCurrentUser();
70325
70325
  useEffect(() => {
70326
70326
  if (!(id && posthog)) {
70327
- return undefined;
70327
+ return;
70328
70328
  }
70329
70329
  posthog.identify(id, {
70330
70330
  email
@@ -70334,6 +70334,9 @@ function useTracking() {
70334
70334
  const trackPageView = () => {
70335
70335
  posthog.capture('$pageview');
70336
70336
  };
70337
+ if (!history) {
70338
+ return;
70339
+ }
70337
70340
  const historyApi = history;
70338
70341
  const unlistenOrUnsubscribe = typeof historyApi.listen === 'function' ? historyApi.listen(trackPageView) : typeof historyApi.subscribe === 'function' ? historyApi.subscribe(trackPageView) : undefined;
70339
70342
  return () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bcrumbs.net/inbox",
3
3
  "description": "Inbox widget for Bread Crumbs portals",
4
- "version": "0.0.45",
4
+ "version": "0.0.46",
5
5
  "keyword": [
6
6
  "bcrumbs",
7
7
  "bc-ui",
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TFunction } from "i18next";
2
3
  import { Row, Action } from "@bcrumbs.net/bc-ui";
3
4
  import { ResourceDefinition } from "../../config";