@star-insure/sdk 3.1.2 → 3.1.3

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
@@ -2,7 +2,7 @@
2
2
  "name": "@star-insure/sdk",
3
3
  "description": "The SDK for Star Insure client apps with shared helper functions and TypeScript definitions.",
4
4
  "author": "alexclark_nz",
5
- "version": "3.1.2",
5
+ "version": "3.1.3",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -12,6 +12,7 @@ export function BackButton({ back }: { back?: string | boolean }) {
12
12
  */
13
13
  React.useEffect(() => {
14
14
  if (typeof window !== 'undefined') {
15
+ if (!breadcrumbs) return;
15
16
  // Set back button URL
16
17
  if (back && typeof back === 'boolean') {
17
18
  // If we haven't provided a path as a prop, use the last breadcrumb that's not the current one
package/src/lib/page.tsx CHANGED
@@ -7,7 +7,7 @@ import { AuthContext, Breadcrumb, Environment } from '../types';
7
7
  */
8
8
  type CustomPageProps = {
9
9
  env: Environment;
10
- breadcrumbs: Breadcrumb[];
10
+ breadcrumbs?: Breadcrumb[];
11
11
  links: Record<string, string>;
12
12
  access_token?: string;
13
13
  impersonate_id?: number;